summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-08-19 17:16:07 +0300
committerFlorian Westphal <fw@strlen.de>2026-01-20 18:23:37 +0300
commitcda26c645946b08f070f20c166d4736767e4a805 (patch)
tree6d643b6f496667de1594a6e08328de560853402f /include
parenta4400a5b343d1bc4aa8f685608515413238e7ee2 (diff)
downloadlinux-cda26c645946b08f070f20c166d4736767e4a805.tar.xz
netfilter: nft_compat: add more restrictions on netlink attributes
As far as I can see nothing bad can happen when NFTA_TARGET/MATCH_NAME are too large because this calls x_tables helpers which check for the length, but it seems better to already reject it during netlink parsing. Rest of the changes avoid silent u8/u16 truncations. For _TYPE, its expected to be only 1 or 0. In x_tables world, this variable is set by kernel, for IPT_SO_GET_REVISION_TARGET its 1, for all others its set to 0. As older versions of nf_tables permitted any value except 1 to mean 'match', keep this as-is but sanitize the value for consistency. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions