[riot-notifications] [RIOT-OS/RIOT] sock_dns: fix out-of-bound errors (#10740)

Marian Buschsieweke notifications at github.com
Thu Jan 10 11:05:57 CET 2019


maribu commented on this pull request.



>          /* skip unwanted answers */
         if ((class != DNS_CLASS_IN) ||
                 ((_type == DNS_TYPE_A) && (family == AF_INET6)) ||
                 ((_type == DNS_TYPE_AAAA) && (family == AF_INET)) ||
                 ! ((_type == DNS_TYPE_A) || ((_type == DNS_TYPE_AAAA))
                     )) {
+            if ((bufpos + addrlen) < buf) {
+                /* buffer wraps around memory space */
+                return -EBADMSG;
+            }

Sure. But today I have to do some teaching... I hope to get to it tomorrow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10740#discussion_r246699469
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190110/2d75814c/attachment-0001.html>


More information about the notifications mailing list