aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-05-17 21:14:11 +0200
committerFlorian Westphal <fw@strlen.de>2022-05-26 23:02:44 +0200
commit4e1ccc035e7d9f93d817fda565e0cfdcbc0d6ef8 (patch)
treec0c7a580c1fd5a11231f2426580eac69a53853d0 /Makefile
parent09de09d51b0918418c3e052b7fa90611a36da221 (diff)
downloadnf-master.tar.gz
netfilter: nfnetlink: fix warn in nfnetlink_unbindHEADmaster
syzbot reports following warn: WARNING: CPU: 0 PID: 3600 at net/netfilter/nfnetlink.c:703 nfnetlink_unbind+0x357/0x3b0 net/netfilter/nfnetlink.c:694 The syzbot generated program does this: socket(AF_NETLINK, SOCK_RAW, NETLINK_NETFILTER) = 3 setsockopt(3, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP, [1], 4) = 0 ... which triggers 'WARN_ON_ONCE(nfnlnet->ctnetlink_listeners == 0)' check. Instead of counting, just enable reporting for every bind request and check if we still have listeners on unbind. While at it, also add the needed bounds check on nfnl_group2type[] access. Reported-by: <syzbot+4903218f7fba0a2d6226@syzkaller.appspotmail.com> Reported-by: <syzbot+afd2d80e495f96049571@syzkaller.appspotmail.com> Fixes: 2794cdb0b97b ("netfilter: nfnetlink: allow to detect if ctnetlink listeners exist") Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions