]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
igmp: Avoid an out-of-bounds access when zeroing counters
authorMark Johnston <markj@FreeBSD.org>
Wed, 5 May 2021 21:06:23 +0000 (17:06 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 5 May 2021 21:12:51 +0000 (17:12 -0400)
commit6c34dde83ee61fc0ba095dcfdac2f381f6bae007
tree9ccde018390038ab06443d3e0949df97280ccf8f
parent9a7c2de36460cdb916734a6969aac666707a639b
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
sys/netinet/igmp.c