diff options
author | Florian Westphal <fw@strlen.de> | 2023-07-20 01:29:58 +0300 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-07-20 12:56:50 +0300 |
commit | ddbd8be68941985f166f5107109a90ce13147c44 (patch) | |
tree | d040cbc705cc1ab134dfc75e3e83ea87ec328fe7 /drivers/fpga/fpga-mgr.c | |
parent | ac528649f7c63bc233cc0d33cff11f767cc666e3 (diff) | |
download | linux-ddbd8be68941985f166f5107109a90ce13147c44.tar.xz |
netfilter: nf_tables: fix spurious set element insertion failure
On some platforms there is a padding hole in the nft_verdict
structure, between the verdict code and the chain pointer.
On element insertion, if the new element clashes with an existing one and
NLM_F_EXCL flag isn't set, we want to ignore the -EEXIST error as long as
the data associated with duplicated element is the same as the existing
one. The data equality check uses memcmp.
For normal data (NFT_DATA_VALUE) this works fine, but for NFT_DATA_VERDICT
padding area leads to spurious failure even if the verdict data is the
same.
This then makes the insertion fail with 'already exists' error, even
though the new "key : data" matches an existing entry and userspace
told the kernel that it doesn't want to receive an error indication.
Fixes: c016c7e45ddf ("netfilter: nf_tables: honor NLM_F_EXCL flag in set element insertion")
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions