[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: allow unknown options (#12298)

Simon Brummer notifications at github.com
Tue Sep 24 19:52:34 CEST 2019


brummer-simon commented on this pull request.



>          }
 
         if (opt_left < TCP_OPTION_LENGTH_MIN || option->length > opt_left) {
-            DEBUG("gnrc_tcp_option.c : _option_parse() : invalid option length\n");
-            return 0;
+            DEBUG("gnrc_tcp_option.c : _option_parse() : Invalid option. Drop Packet.\n");
+            return -1;

Well the 'return 0' is actually part of the buggy behavoir. If the condition comes true, the given options violates the basic option structure either by being to small or exceeding the remaining buffer. In both cases the packet is malformed.

  

-- 
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/12298#discussion_r327752278
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190924/28e7d059/attachment-0001.htm>


More information about the notifications mailing list