]> git.hungrycats.org Git - linux/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:37 +0000 (09:48 +0200)
commit93450ea57eec9fe042edefc52a8c9078d6435ae4
tree2324850ada38c59331bae86186fc90972ea3e893
parentd59b6fc405549f7caf31f6aa5da1d6bef746b166
netfilter: nft_exthdr: Fix non-linear header modification

commit 28427f368f0e08d504ed06e74bc7cc79d6d06511 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_exthdr.c