mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
pf: Avoid leaking pad bytes in struct pfr_astats when copying out
There is padding between pfr_astats.pfras_a and pfras_packets that was not getting initialized. Reported by: KMSAN Reviewed by: kp, imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30585
This commit is contained in:
parent
cbe59a6475
commit
60a38abb89
@ -1028,6 +1028,7 @@ pfr_copyout_astats(struct pfr_astats *as, const struct pfr_kentry *ke,
|
||||
int dir, op;
|
||||
const struct pfr_kcounters *kc = &ke->pfrke_counters;
|
||||
|
||||
bzero(as, sizeof(*as));
|
||||
pfr_copyout_addr(&as->pfras_a, ke);
|
||||
as->pfras_tzero = kc->pfrkc_tzero;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user