Commit 800dcea0 authored by Florian Westphal's avatar Florian Westphal Committed by Yongqiang Liu
Browse files

netfilter: nf_queue: do not allow packet truncation below transport header offset

mainline inclusion
from mainline-v5.19-rc3
commit 99a63d36
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5J9R4


CVE: CVE-2022-36946

--------------------------------

Domingo Dirutigliano and Nicola Guerrera report kernel panic when
sending nf_queue verdict with 1-byte nfta_payload attribute.

The IP/IPv6 stack pulls the IP(v6) header from the packet after the
input hook.

If user truncates the packet below the header size, this skb_pull() will
result in a malformed skb (skb->len < 0).

Fixes: 7af4cc3f ("[NETFILTER]: Add "nfnetlink_queue" netfilter queue handler over nfnetlink")
Reported-by: default avatarDomingo Dirutigliano <pwnzer0tt1@proton.me>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Reviewed-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 0947a678
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment