Skip to content

netfilter: nf_tables: set dormant flag on hook register failure

Phil Sutter requested to merge psutter1/centos-stream-9:c9s/RHEL-33123 into main

CVE: CVE-2024-26835 JIRA: https://issues.redhat.com/browse/RHEL-33123 Upstream Status: commit bccebf64701735533c8db37773eeacc6566cc8ec

commit bccebf64701735533c8db37773eeacc6566cc8ec Author: Florian Westphal fw@strlen.de Date: Mon Feb 19 16:58:04 2024 +0100

netfilter: nf_tables: set dormant flag on hook register failure

We need to set the dormant flag again if we fail to register
the hooks.

During memory pressure hook registration can fail and we end up
with a table marked as active but no registered hooks.

On table/base chain deletion, nf_tables will attempt to unregister
the hook again which yields a warn splat from the nftables core.

Reported-and-tested-by: syzbot+de4025c006ec68ac56fc@syzkaller.appspotmail.com
Fixes: 179d9ba5559a ("netfilter: nf_tables: fix table flag updates")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Signed-off-by: Phil Sutter psutter@redhat.com

Merge request reports