Page MenuHomeFreeBSD

tcp, udp: improve input validation in bind()
ClosedPublic

Authored by tuexen on Aug 5 2021, 11:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 5:05 PM
Unknown Object (File)
Feb 14 2024, 2:29 AM
Unknown Object (File)
Feb 10 2024, 5:12 AM
Unknown Object (File)
Dec 30 2023, 4:26 PM
Unknown Object (File)
Dec 21 2023, 2:21 PM
Unknown Object (File)
Dec 13 2023, 11:22 AM
Unknown Object (File)
Dec 1 2023, 6:04 AM
Unknown Object (File)
Nov 16 2023, 9:57 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tuexen added reviewers: rscheff, rrs.
This revision is now accepted and ready to land.Aug 5 2021, 11:08 AM

Thank you.

sys/netinet/tcp_usrreq.c
329

I would just check nam->sa_len != sizeof(*sinp) since we perform that exact check again below. This is ok though.

tuexen added inline comments.
sys/netinet/tcp_usrreq.c
329

I was considering that or even just do the check for sa_len before the check for sa_family. I decided to do it this way to report EINVAL if sa_len is not correct as often as possible.

This revision was automatically updated to reflect the committed changes.
tuexen marked an inline comment as done.