Linux kernel use-after-free in Netfilter, local privilege escalation
1–10 of 107 posts
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#2Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#3Glad to have sticked with the good old iptables and left CONFIG_NF_TABLES unset in kernel configuration.
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#4I'd be very interested to hear how this can be done by an unprivileged user.
Try to race set add/removals, sure, but if it depends on the set itself getting deleted, that seems… harder.
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#5Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#6Glad to have sticked with the good old iptables and left CONFIG_NF_TABLES unset in kernel configuration.
Aren't iptables just an emulation layer on top of netfilter?
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#7> delete an existing nft rule that uses an nft anonymous set. And an example of the latter operation is an attempt to delete an element from that nft anonymous set after the set gets deleted I'd be very interested to hear how this can be done by an unprivileged user. Try to race set add/removals, sure, but if it depends on the set itself getting deleted, that seems… harder.
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#8Therefore, according to the linux-distros list policy, the exploit must be published within 7 days from this advisory. In order to comply with that policy, I intend to publish both the description of exploitation techniques and also the exploit source code on Monday 15th by email to this list."
Interesting.. they didn't write what conditions have to be met for it to be exploitable. Also interesting that someone screwed up and accidentally forwarded an email including the exploit to a broad mailing list...
Part of the nf modules are active if you have iptables, which you have if you run ufw (for example), so pretty broad exploit if that's all that's required, but the specific module in question in the patch, nf_tables, is not loaded on my Ubuntu 20.04LTS 5.40 kernel running iptables/ufw at least.
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#9Earlier quoted context omitted.
Aren't iptables just an emulation layer on top of netfilter?
Yes, AFAIU (not an expert), iptables and nftables are two command line tools and abstractions (chains vs. tables) for interacting with the same underlying netfilter API.
Re: Linux kernel use-after-free in Netfilter, local privilege escalation
#10"We developed an exploit that allows unprivileged local users to start a root shell by abusing the above issue. That exploit was shared privately with to assist with fix development. Somebody from the Linux kernel team then emailed the proposed fix to and that email also included a link to download our description of exploitation techniques and our exploit source code. Therefore, according to the linux-distros list p…
This doesn't matter since Linux has autoloading of most network modules, and you can cause the modules to be loaded on Ubuntu since it supports unprivileged user/net namespaces.
ubuntu:~% grep DISTRIB_DESCRIPTION /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
ubuntu:~% lsmod|grep nf_table
ubuntu:~% unshare -U -m -n -r
ubuntu:~% nft add table inet filter
ubuntu:~% lsmod|grep nf_table
nf_tables 249856 0