HomeFreeBSD

igmp: Avoid an out-of-bounds access when zeroing counters

Description

igmp: Avoid an out-of-bounds access when zeroing counters

When verifying, byte-by-byte, that the user-supplied counters are
zero-filled, sysctl_igmp_stat() would check for zero before checking the
loop bound. Perform the checks in the correct order.

Reported by: KASAN
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6c34dde83ee61fc0ba095dcfdac2f381f6bae007)

Details

Provenance
markjAuthored on May 5 2021, 9:06 PM
Parents
rG699e490dfc21: full(4): Use correct section name for AUTHORS
Branches
Unknown
Tags
Unknown