]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_reject_ipv4: Fix use-after-free in send_reset
authorTejaswi Tanikella <tejaswit@codeaurora.org>
Mon, 23 Oct 2017 06:16:03 +0000 (11:46 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Nov 2017 11:15:29 +0000 (12:15 +0100)
commit6a26562643cc8caed2955abfddb8bb55ae0340fb
treeaabbc224b7f7d620573fd638431a26f0442eac59
parent7d9e52d90b4b52b4dbd9692f9009839a1fabb337
netfilter: nf_reject_ipv4: Fix use-after-free in send_reset

niph is not updated after pskb_expand_head changes the skb head. It
still points to the freed data, which is then used to update tot_len and
checksum. This could cause use-after-free poison crash.

Update niph, if ip_route_me_harder does not fail.

This only affects the interaction with REJECT targets and br_netfilter.

Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_reject_ipv4.c