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

   ## Summary                                                                   
                                                                                
   Harden CDC-NCM receive parsing against malformed host-provided NTBs.         
                                                                                
   ## Changes                                                                   
                                                                                
   - Reject short NTBs before reading the NTH header.                           
   - Reject NTB block lengths that exceed either the configured maximum or the  
     actual received byte count.                                                
   - Bound the number of NDPs parsed from a single NTB so a self-referencing NDP
     chain cannot loop indefinitely.                                            
   - Validate that each NDP lies fully inside the NTB.                          
   - Reject datagrams whose offset and length extend outside the received block.
   
   ## 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