Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102544380
D31422.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
809 B
Referenced Files
None
Subscribers
None
D31422.diff
View Options
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -326,6 +326,7 @@
* Preserve compatibility with old programs.
*/
if (nam->sa_family != AF_UNSPEC ||
+ nam->sa_len < offsetof(struct sockaddr_in, sin_zero) ||
sinp->sin_addr.s_addr != INADDR_ANY)
return (EAFNOSUPPORT);
nam->sa_family = AF_INET;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1635,6 +1635,7 @@
* Preserve compatibility with old programs.
*/
if (nam->sa_family != AF_UNSPEC ||
+ nam->sa_len < offsetof(struct sockaddr_in, sin_zero) ||
sinp->sin_addr.s_addr != INADDR_ANY)
return (EAFNOSUPPORT);
nam->sa_family = AF_INET;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 8:49 PM (7 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14633582
Default Alt Text
D31422.diff (809 B)
Attached To
Mode
D31422: tcp, udp: improve input validation in bind()
Attached
Detach File
Event Timeline
Log In to Comment