Page MenuHomeFreeBSD

D17914.id50243.diff
No OneTemporary

D17914.id50243.diff

Index: head/sys/netinet/ip_reass.c
===================================================================
--- head/sys/netinet/ip_reass.c
+++ head/sys/netinet/ip_reass.c
@@ -228,6 +228,16 @@
ip->ip_off = htons(ntohs(ip->ip_off) << 3);
/*
+ * Make sure the fragment lies within a packet of valid size.
+ */
+ if (ntohs(ip->ip_len) + ntohs(ip->ip_off) > IP_MAXPACKET) {
+ IPSTAT_INC(ips_toolong);
+ IPSTAT_INC(ips_fragdropped);
+ m_freem(m);
+ return (NULL);
+ }
+
+ /*
* Attempt reassembly; if it succeeds, proceed.
* ip_reass() will return a different mbuf.
*/

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 5, 6:26 PM (15 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40224019
Default Alt Text
D17914.id50243.diff (579 B)

Event Timeline