summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <fmancera@suse.de>2026-04-28 13:25:46 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2026-04-30 18:59:01 +0300
commit0bf00859d7a5ab685901c36f29df063b825cfaaa (patch)
tree442d3a449e36c669dcb2ed49d94481313f6e6321 /include
parent63bac027860308d1344f761cb47aabb3b30973fd (diff)
downloadlinux-0bf00859d7a5ab685901c36f29df063b825cfaaa.tar.xz
netfilter: nf_socket: skip socket lookup for non-first fragments
Both nft_socket and xt_socket relies on L4 headers to perform socket lookup in the slow path. For fragmented packets, while the IP protocol remains constant across all fragments, only the first fragment contains the actual L4 header. As the expression/match could be attached to a chain with a priority lower than -400, it could bypass defragmentation. Add a check for fragmentation in the lookup functions directly so the problem is handled for both nft_socket and xt_socket at the same time. In addition, future users of the functions would not need to care about this. Fixes: 902d6a4c2a4f ("netfilter: nf_defrag: Skip defrag if NOTRACK is set") Fixes: 554ced0a6e29 ("netfilter: nf_tables: add support for native socket matching") Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions