Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103540470
D24852.id71988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24852.id71988.diff
View Options
Index: tcp_usrreq.c
===================================================================
--- tcp_usrreq.c
+++ tcp_usrreq.c
@@ -552,6 +552,10 @@
if (sinp->sin_family == AF_INET
&& IN_MULTICAST(ntohl(sinp->sin_addr.s_addr)))
return (EAFNOSUPPORT);
+ if ((sinp->sin_family == AF_INET) &&
+ ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sinp->sin_addr.s_addr == INADDR_ANY)))
+ return(EAFNOSUPPORT);
if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0)
return (error);
@@ -652,6 +656,11 @@
error = EAFNOSUPPORT;
goto out;
}
+ if ((ntohl(sin.sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sin.sin_addr.s_addr == INADDR_ANY)) {
+ error = EAFNOSUPPORT;
+ goto out;
+ }
if ((error = prison_remote_ip4(td->td_ucred,
&sin.sin_addr)) != 0)
goto out;
@@ -1024,6 +1033,13 @@
error = EAFNOSUPPORT;
goto out;
}
+ if ((ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) ||
+ (sinp->sin_addr.s_addr == INADDR_ANY)) {
+ if (m)
+ m_freem(m);
+ error = EAFNOSUPPORT;
+ goto out;
+ }
if ((error = prison_remote_ip4(td->td_ucred,
&sinp->sin_addr))) {
if (m)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 6:58 AM (16 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14880673
Default Alt Text
D24852.id71988.diff (1 KB)
Attached To
Mode
D24852: Invalid addresses in sending or connecting
Attached
Detach File
Event Timeline
Log In to Comment