Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174506049
D57383.id179382.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
940 B
Referenced Files
None
Subscribers
None
D57383.id179382.diff
View Options
diff --git a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c
--- a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c
+++ b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c
@@ -318,7 +318,9 @@
* it should match 1a2b3c4d. Byte order is ignored,
* deliberately, when printing out the error.
*/
- len = MIN(8 - pptps->pptps_bytes, dlen);
+ if (pptps->pptps_bytes >= 8)
+ return (-1);
+ len = MIN((size_t)(8 - pptps->pptps_bytes), dlen);
COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr);
pptps->pptps_bytes += len;
pptps->pptps_wptr += len;
@@ -361,7 +363,9 @@
}
}
- len = MIN(pptps->pptps_len - pptps->pptps_bytes, dlen);
+ if (pptps->pptps_len <= pptps->pptps_bytes)
+ return (-1);
+ len = MIN((size_t)(pptps->pptps_len - pptps->pptps_bytes), dlen);
COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr);
pptps->pptps_bytes += len;
pptps->pptps_wptr += len;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 7:02 PM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40179243
Default Alt Text
D57383.id179382.diff (940 B)
Attached To
Mode
D57383: ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow
Attached
Detach File
Event Timeline
Log In to Comment