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
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on May 5 2021, 9:06 PM
Parents
rG9a7c2de36460: realloc: Fix KASAN(9) shadow map updates
Branches
Unknown
Tags
Unknown