summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-04-21 13:34:21 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2021-04-26 04:20:47 +0300
commit593268ddf3887362ba8b8998cb85433596a3e8f5 (patch)
tree9cca69bd1b7fef118f6db888bbf2a17d203e33ec /net
parentf7163c4882e883fabdafb894176994fd2ade33e2 (diff)
downloadlinux-593268ddf3887362ba8b8998cb85433596a3e8f5.tar.xz
netfilter: nf_log_syslog: Unset bridge logger in pernet exit
Without this, a stale pointer remains in pernet loggers after module unload causing a kernel oops during dereference. Easily reproduced by: | # modprobe nf_log_syslog | # rmmod nf_log_syslog | # cat /proc/net/netfilter/nf_log Fixes: 77ccee96a6742 ("netfilter: nf_log_bridge: merge with nf_log_syslog") Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_log_syslog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/nf_log_syslog.c b/net/netfilter/nf_log_syslog.c
index 2518818ed479..13234641cdb3 100644
--- a/net/netfilter/nf_log_syslog.c
+++ b/net/netfilter/nf_log_syslog.c
@@ -1011,6 +1011,7 @@ static void __net_exit nf_log_syslog_net_exit(struct net *net)
nf_log_unset(net, &nf_arp_logger);
nf_log_unset(net, &nf_ip6_logger);
nf_log_unset(net, &nf_netdev_logger);
+ nf_log_unset(net, &nf_bridge_logger);
}
static struct pernet_operations nf_log_syslog_net_ops = {