Skip to content
Commit 26f4dac1 authored by Kees Cook's avatar Kees Cook Committed by Florian Westphal
Browse files

netfilter: x_tables: Use unsafe_memcpy() for 0-sized destination



The struct xt_entry_target fake flexible array has not be converted to a
true flexible array, which is mainly blocked by it being both UAPI and
used in the middle of other structures. In order to properly check for
0-sized destinations in memcpy(), an exception must be made for the one
place where it is still a destination. Since memcpy() was already
skipping checks for 0-sized destinations, using unsafe_memcpy() is no
change in behavior.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent 3f801968
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment