pf: zero output buffer in pfioctl
Avoid potential structure padding leak. Reported by: Vlad Tsyrklevich <vlad@tsyrklevich.net> Reviewed by: kp MFC after: 3 days Security: Potential kernel memory disclosure Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
8d3bb29faf
commit
e6cea1ca6d
@ -2169,7 +2169,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
|
||||
break;
|
||||
}
|
||||
|
||||
p = pstore = malloc(ps->ps_len, M_TEMP, M_WAITOK);
|
||||
p = pstore = malloc(ps->ps_len, M_TEMP, M_WAITOK | M_ZERO);
|
||||
nr = 0;
|
||||
|
||||
for (i = 0; i <= pf_hashmask; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user