anchao opened a new pull request, #20888:
URL: https://github.com/apache/nuttx/pull/20888

   ## Summary                                                                   
 
                                                                                
 
   Harden ICMPv6 Router Advertisement option parsing against truncated options. 
 
   
   The parser validated the total RA option area length, but individual option 
handlers trusted each option's claimed length before reading fixed fields. A 
malformed on-link Router Advertisement could place a truncated option at the 
end of the option area and make the PREFIX, MTU, source link-layer address, or 
RDNSS handler read past the received packet buffer.
   
   ## Changes                                                                   
                           
                                                                                
                           
   - Validate that each option header is present before reading `optlen`.       
                           
   - Reject zero-length RA options.                                             
                           
   - Validate that the claimed option length fits in the remaining option area 
before dispatching.         
   - Validate fixed fields required by SRCLLADDR, PREFIX, MTU, and RDNSS before 
reading them.              
                                                                                
                           
   ## Testing                                                                   
                           
   
   sim/usbdev


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to