Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102703715
D38936.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
D38936.diff
View Options
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -561,7 +561,8 @@
if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr)))
goto badcode;
/* Filter out responses to INADDR_ANY, protocols ignore it. */
- if (icp->icmp_ip.ip_dst.s_addr == INADDR_ANY)
+ if (icp->icmp_ip.ip_dst.s_addr == INADDR_ANY ||
+ icp->icmp_ip.ip_src.s_addr == INADDR_ANY)
goto freeit;
#ifdef ICMPPRINTFS
if (icmpprintfs)
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1070,6 +1070,14 @@
*/
eip6 = (struct ip6_hdr *)(icmp6 + 1);
+ /*
+ * Protocol layers can't do anything useful with unspecified
+ * addresses.
+ */
+ if (IN6_IS_ADDR_UNSPECIFIED(&eip6->ip6_src) ||
+ IN6_IS_ADDR_UNSPECIFIED(&eip6->ip6_dst))
+ goto freeit;
+
icmp6dst.sin6_len = sizeof(struct sockaddr_in6);
icmp6dst.sin6_family = AF_INET6;
if (IN6_IS_ADDR_UNSPECIFIED(&icmp6dst.sin6_addr))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 2:24 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14669170
Default Alt Text
D38936.diff (1018 B)
Attached To
Mode
D38936: netinet: Disallow unspecified addresses in ICMP-embedded packets
Attached
Detach File
Event Timeline
Log In to Comment