Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106134199
D17909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
798 B
Referenced Files
None
Subscribers
None
D17909.diff
View Options
Index: head/sys/netinet/ip_icmp.c
===================================================================
--- head/sys/netinet/ip_icmp.c
+++ head/sys/netinet/ip_icmp.c
@@ -320,7 +320,8 @@
#endif
icmplen = min(icmplen, M_TRAILINGSPACE(m) -
sizeof(struct ip) - ICMP_MINLEN);
- m_align(m, ICMP_MINLEN + icmplen);
+ m_align(m, sizeof(struct ip) + ICMP_MINLEN + icmplen);
+ m->m_data += sizeof(struct ip);
m->m_len = ICMP_MINLEN + icmplen;
/* XXX MRT make the outgoing packet use the same FIB
@@ -362,6 +363,8 @@
* reply should bypass as well.
*/
m->m_flags |= n->m_flags & M_SKIP_FIREWALL;
+ KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ip),
+ ("insufficient space for ip header"));
m->m_data -= sizeof(struct ip);
m->m_len += sizeof(struct ip);
m->m_pkthdr.len = m->m_len;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 11:23 PM (11 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15608915
Default Alt Text
D17909.diff (798 B)
Attached To
Mode
D17909: Avoid buffer underwrite in icmp_error
Attached
Detach File
Event Timeline
Log In to Comment