Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145056582
D53281.1777294613.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
673 B
Referenced Files
None
Subscribers
None
D53281.1777294613.diff
View Options
diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c
--- a/sys/netpfil/ipfilter/netinet/ip_state.c
+++ b/sys/netpfil/ipfilter/netinet/ip_state.c
@@ -938,10 +938,12 @@
* Look up all the interface names in the rule.
*/
for (i = 0; i < FR_NUM(fr->fr_ifnames); i++) {
- if (fr->fr_ifnames[i] == -1) {
+ if (fr->fr_ifnames[i] < 0) {
fr->fr_ifas[i] = NULL;
continue;
}
+ if (strnlen(fr->fr_ifnames[i], MAX_IFNAME_LENGTH) > fr->fr_namelen && fr->fr_namelen >= MAX_IFNAME_LENGTH)
+ continue;
name = FR_NAME(fr, fr_ifnames[i]);
fr->fr_ifas[i] = ipf_resolvenic(softc, name,
fr->fr_family);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 27, 12:56 PM (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28440036
Default Alt Text
D53281.1777294613.diff (673 B)
Attached To
Mode
D53281: ipfilter: Avoid out of bounds read in ip_state
Attached
Detach File
Event Timeline
Log In to Comment