Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140095742
D5426.id13698.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
687 B
Referenced Files
None
Subscribers
None
D5426.id13698.diff
View Options
Index: sys/netpfil/pf/pf_ioctl.c
===================================================================
--- sys/netpfil/pf/pf_ioctl.c
+++ sys/netpfil/pf/pf_ioctl.c
@@ -2718,13 +2718,14 @@
case DIOCRSETADDRS: {
struct pfioc_table *io = (struct pfioc_table *)addr;
struct pfr_addr *pfras;
- size_t totlen;
+ size_t totlen, count;
if (io->pfrio_esize != sizeof(struct pfr_addr)) {
error = ENODEV;
break;
}
- totlen = io->pfrio_size * sizeof(struct pfr_addr);
+ count = max(io->pfrio_size, io->pfrio_size2);
+ totlen = count * sizeof(struct pfr_addr);
pfras = malloc(totlen, M_TEMP, M_WAITOK);
error = copyin(io->pfrio_buffer, pfras, totlen);
if (error) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 4:18 AM (7 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27106916
Default Alt Text
D5426.id13698.diff (687 B)
Attached To
Mode
D5426: pf: Fix possible out-of-bounds write
Attached
Detach File
Event Timeline
Log In to Comment