Skip to content
Commit 63ec72bd authored by Kees Cook's avatar Kees Cook Committed by Jakub Kicinski
Browse files

mptcp: Use struct_group() to avoid cross-field memset()



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

Use struct_group() to capture the fields to be reset, so that memset()
can be appropriately bounds-checked by the compiler.

Cc: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.linux.dev
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Link: https://lore.kernel.org/r/20220121073935.1154263-1-keescook@chromium.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2c13c05c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment