Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #968581
| From | Salvatore Bonaccorso <carnil@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#934168: linux-image-4.19.0-5-amd64: iptables-restore may result in NULL pointer dereference at nf_tables_newrule on startup |
| Date | 2019-08-07 22:50 +0200 |
| Message-ID | <ysB2F-4ep-3@gated-at.bofh.it> (permalink) |
| References | <ysB2F-4ep-5@gated-at.bofh.it> <ysB2F-4ep-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
Control: forcemerge 931330 934168 hi Elias, On Wed, Aug 07, 2019 at 06:51:12PM +0200, Elias Werberich wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Package: src:linux > Version: 4.19.37-5+deb10u1 > Severity: normal > X-Debbugs-Cc: elias@werberich.de > > > Dear Kernel Maintainer, > > I found a reproducible bug which causes a linux kernel oops if > netfilter-persistence.service tries to load IPv4 firewall rules on > startup by calling iptables-restore with the following content as > input: > > *filter > :INPUT ACCEPT [0:0] > :FORWARD DROP [0:0] > :OUTPUT ACCEPT [0:0] > :MY-ICMP - [0:0] > - -A INPUT -j MY-ICMP > - -A MY-ICMP -p icmp -m icmp --icmp-type 3 -j ACCEPT > - -A MY-ICMP -p icmp -m icmp --icmp-type 11 -j ACCEPT > - -A MY-ICMP -p icmp -m icmp --icmp-type 8 -m limit --limit 4/sec -j ACCEPT > COMMIT > > I was able to create this simple ruleset out of a more complex firewall configuration. > This kernel oops appears on nine out of ten startups/reboots. > If it appears, iptables/nftables are not usable anymore. > For more details, consult kernel log. > > Steps to reproduce the kernel oops: > > # Install a fresh, minimal Debian 10 Buster system. (e.g. new VM) > $ apt update > $ apt install iptables iptables-persistent > # Save IPv4 rules on installation, do not save IPv6 rules. > $ cat << \EOF > /etc/iptables/rules.v4 > *filter > :INPUT ACCEPT [0:0] > :FORWARD DROP [0:0] > :OUTPUT ACCEPT [0:0] > :MY-ICMP - [0:0] > - -A INPUT -j MY-ICMP > - -A MY-ICMP -p icmp -m icmp --icmp-type 3 -j ACCEPT > - -A MY-ICMP -p icmp -m icmp --icmp-type 11 -j ACCEPT > - -A MY-ICMP -p icmp -m icmp --icmp-type 8 -m limit --limit 4/sec -j ACCEPT > COMMIT > EOF > $ reboot > > You may need to reboot a second or third time, if it does not appear > on the first startup. > > I was able to reproduce this on AMD64 using VirtualBox VM and a > cloud server provider. It may cause a broken firewall configuration > which leads to a security issue if you reboot without monitoring. Thanks for the reproducing instructions. This looks the same as the bug reported at https://bugzilla.kernel.org/show_bug.cgi?id=203681 which is #931330. This should be fixed in 5.2.6-1. But might need to check which commit(s) fix the issue and see they are already backported to the 4.19.x stable series as well. Regards, Salvatore
Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread
Bug#934168: linux-image-4.19.0-5-amd64: iptables-restore may result in NULL pointer dereference at nf_tables_newrule on startup Salvatore Bonaccorso <carnil@debian.org> - 2019-08-07 22:50 +0200
csiph-web