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

   
   When do socket bind, if the connection domain is not equal to the bound 
address type, this will cause the stack-buffer-overflow.
   
   ## Summary
   When bind the sockaddr, Check conn->domain and addr->sa_family. If they 
aren't equal, return an error early.
    which can avoid the problem of stack buffer overflow.
   
   ## Impact
   Avoid an exception caused by using the bad address on binding.
   
   ## Testing
   When the socket of type AF_INET4, if the sockaddr of type AF_INET6 are used, 
the bind interface returns an error and does not cause any other exception.
   


-- 
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