Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177438855
D57383.1794394002.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
940 B
Referenced Files
None
Subscribers
None
D57383.1794394002.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
Wed, Nov 11, 10:46 AM (12 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41644193
Default Alt Text
D57383.1794394002.diff (940 B)
Attached To
Mode
D57383: ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow
Attached
Detach File
Event Timeline