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

Martine Lenders notifications at github.com
Wed Jan 9 23:33:40 CET 2019


miri64 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;
+            }

>From what I know about optimization 6122e7258ada133e248fcdca5bf223a6b9623a6e *should* fix it.

-- 
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_r246571947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190109/0d3fc64b/attachment.html>


More information about the notifications mailing list