OSDN Git Service

netfilter: nft_exthdr: Fix non-linear header modification
authorXiao Liang <shaw.leon@gmail.com>
Fri, 25 Aug 2023 05:33:27 +0000 (13:33 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Aug 2023 15:34:01 +0000 (17:34 +0200)
commit28427f368f0e08d504ed06e74bc7cc79d6d06511
tree577340238ef5c7c2c23ec9d8a3be454a50d3fef4
parentbd6c11bc43c496cddfc6cf603b5d45365606dbd5
netfilter: nft_exthdr: Fix non-linear header modification

Fix skb_ensure_writable() size. Don't use nft_tcp_header_pointer() to
make it explicit that pointers point to the packet (not local buffer).

Fixes: 99d1712bc41c ("netfilter: exthdr: tcp option set support")
Fixes: 7890cbea66e7 ("netfilter: exthdr: add support for tcp option removal")
Cc: stable@vger.kernel.org
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_exthdr.c