Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106165353
D17909.id50173.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
739 B
Referenced Files
None
Subscribers
None
D17909.id50173.diff
View Options
Index: sys/netinet/ip_icmp.c
===================================================================
--- sys/netinet/ip_icmp.c
+++ 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,7 @@
* reply should bypass as well.
*/
m->m_flags |= n->m_flags & M_SKIP_FIREWALL;
+ KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ip));
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
Fri, Dec 27, 11:25 AM (9 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15613812
Default Alt Text
D17909.id50173.diff (739 B)
Attached To
Mode
D17909: Avoid buffer underwrite in icmp_error
Attached
Detach File
Event Timeline
Log In to Comment