Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102644850
D31302.id92761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
487 B
Referenced Files
None
Subscribers
None
D31302.id92761.diff
View Options
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -523,8 +523,15 @@
} else {
if (m->m_pkthdr.len > IP_MAXPACKET) {
m_freem(m);
- return(EMSGSIZE);
+ return (EMSGSIZE);
}
+ if (m->m_pkthdr.len < sizeof(*ip)) {
+ m_freem(m);
+ return (EINVAL);
+ }
+ m = m_pullup(m, sizeof(*ip));
+ if (m == NULL)
+ return (ENOMEM);
ip = mtod(m, struct ip *);
hlen = ip->ip_hl << 2;
if (m->m_len < hlen) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 6:47 AM (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14654741
Default Alt Text
D31302.id92761.diff (487 B)
Attached To
Mode
D31302: rip: Add missing minimum length validation
Attached
Detach File
Event Timeline
Log In to Comment