structure pads can leak uninitialized memory to userland via copyout,
authorderaadt <deraadt@openbsd.org>
Wed, 15 Dec 2021 17:21:08 +0000 (17:21 +0000)
committerderaadt <deraadt@openbsd.org>
Wed, 15 Dec 2021 17:21:08 +0000 (17:21 +0000)
commit1823cafe65caf80f9a4cb5fb7a691e021b9f1232
tree813eed573e0d6380b203e82c6e505654781a33e9
parent4888f4f45255fe0cd137baf4c7eebdad6cf39959
structure pads can leak uninitialized memory to userland via copyout,
therefore the mandatory idiom is completely clearing structs before
building them for copyout -- that means ALMOST ALL STRUCTS, because
we never know when some architecture will pad a struct..  In two more
cases, the clearing wasn't performed.
from Reno Robert ZDI
ok millert bluhm
sys/netinet/ip_mroute.c
sys/netinet6/ip6_mroute.c