]> git.hungrycats.org Git - linux/commit
netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 5 May 2021 20:25:24 +0000 (22:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:46 +0000 (10:29 +0200)
commit142d91d0fb292581e7258c7c85f522fe8db00769
tree3ab16a9a24142ddc6e833822c9dcccf0c94cbca9
parent80a9709678eda8b49a5c004b8112229c90802721
netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check

[ Upstream commit 5e024c325406470d1165a09c6feaf8ec897936be ]

Do not assume that the tcph->doff field is correct when parsing for TCP
options, skb_header_pointer() might fail to fetch these bits.

Fixes: 11eeef41d5f6 ("netfilter: passive OS fingerprint xtables match")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nfnetlink_osf.c