]> git.baikalelectronics.ru Git - kernel.git/commit
net: dccp: Use memset_startat() for TP zeroing
authorKees Cook <keescook@chromium.org>
Thu, 18 Nov 2021 20:30:19 +0000 (12:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Nov 2021 11:22:49 +0000 (11:22 +0000)
commitac6976909cccd8b04ab0eb316f3b578e69569f11
tree6afa3f45ae56e88d7b44b48c77f9316c87719a7f
parent9128beea0b5726058fca7a8d355f7716acf2f6c8
net: dccp: Use memset_startat() for TP zeroing

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

Use memset_startat() so memset() doesn't get confused about writing
beyond the destination member that is intended to be the starting point
of zeroing through the end of the struct.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/trace.h