Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c01fc523 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by Vegard Nossum
Browse files

netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers



[ Upstream commit 7931d32955e09d0a11b1fe0b6aac1bfa061c005c ]

register store validation for NFT_DATA_VALUE is conditional, however,
the datatype is always either NFT_DATA_VALUE or NFT_DATA_VERDICT. This
only requires a new helper function to infer the register type from the
set datatype so this conditional check can be removed. Otherwise,
pointer to chain object can be leaked through the registers.

Fixes: 96518518 ("netfilter: add nftables")
Reported-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 40188a25a9847dbeb7ec67517174a835a677752f)
[Vegard: fixed unrelated conflict due to missing commit
 9c22bd1ab442c552e9481f1157589362887a7f47 ("netfilter: nf_tables: defer
 gc run if previous batch is still pending").]
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
parent f6658c76
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