ipv6: Use memset_after() to zero rt6_info
authorKees Cook <keescook@chromium.org>
Thu, 18 Nov 2021 20:32:41 +0000 (12:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Nov 2021 11:51:26 +0000 (11:51 +0000)
commit8f2a83b454c9b17989843756313e0180827a7ace
treef1b5bae17dbb931bc8f2163d3e98024412623a42
parente3617433c3da3d0859a4bc67f3f975e87f650ebf
ipv6: Use memset_after() to zero rt6_info

In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.

Use memset_after() to clear everything after the dst_entry member of
struct rt6_info.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c