CVE
CVE-2022-48912
CNA description
In the Linux kernel, the following vulnerability has been resolved: netfilter: fix use-after-free in __nf_register_net_hook() We must not dereference @new_hooks after nf_hook_mutex has been released, because other threads might have freed our allocated hooks already. BUG: KASAN: use-after-free in nf_hook_entries_get_hook_ops include/linux/netfilter.h:130 [inline] BUG: KASAN: use-after-free in hooks_validate net/netfilter/core.c:171 [inline] BUG: KASAN: use-after-free in __nf_register_net_hook+0x77a/0x820 net/netfilter/core.c:438 Read of size 2 at addr ffff88801c1a8000 by task syz-executor237/4430 CPU: 1 PID: 4430 Comm: syz-executor237 Not tainted 5.17.0-rc5-syzkaller-00306-g2293be58d6a1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 nf_hook_entries_get_hook_ops include/linux/netfilter.h:130 [inline] hooks_validate net/netfilter/core.c:171 [inline] __nf_register_net_hook+0x77a/0x820 net/netfilter/core.c:438 nf_register_net_hook+0x114/0x170 net/netfilter/core.c:571 nf_register_net_hooks+0x59/0xc0 net/netfilter/core.c:587 nf_synproxy_ipv6_init+0x85/0xe0 net/netfilter/nf_synproxy_core.c:1218 synproxy_tg6_check+0x30d/0x560 net/ipv6/netfilter/ip6t_SYNPROXY.c:81 xt_check_target+0x26c/0x9e0 net/netfilter/x_tables.c:1038 check_target net/ipv6/netfilter/ip6_tables.c:530 [inline] find_check_entry.constprop.0+0x7f1/0x9e0 net/ipv6/netfilter/ip6_tables.c:573 translate_table+0xc8b/0x1750 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1153 [inline] do_ip6t_set_ctl+0x56e/0xb90 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x83/0xe0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x122/0x180…
Affected versions
All Linux kernel vulnerabilities →
- ≥ 5.16, < 5.16.13Fixed in 5.16.13
- ≥ 5.11, < 5.15.27Fixed in 5.15.27
- ≥ 5.5, < 5.10.104Fixed in 5.10.104
- ≥ 4.20, < 5.4.183Fixed in 5.4.183
- ≥ 4.15, < 4.19.233Fixed in 4.19.233
- ≥ 4.14, < 4.14.270Fixed in 4.14.270
Distribution packages (Debian, Ubuntu, Red Hat…) backport fixes without changing the upstream version: check your distribution’s advisory as well.
Advisories and patches
- git.kernel.org/stable/c/05f7927b25d2635e87267ff6c79db79fb46cf313 · Patch
- git.kernel.org/stable/c/49c24579cec41e32f13d57b337fd28fb208d4a5b · Patch
- git.kernel.org/stable/c/56763f12b0f02706576a088e85ef856deacc98a0 · Patch
- git.kernel.org/stable/c/5a8076e98dde17224dd47283b894a8b1dbe1bc72 · Patch
- git.kernel.org/stable/c/8b0142c4143c1ca297dcf2c0cdd045d65dae2344 · Patch
- git.kernel.org/stable/c/bd61f192a339b1095dfd6d56073a5265934c2979 · Patch
- git.kernel.org/stable/c/bdd8fc1b826e6f23963f5bef3f7431c6188ec954 · Patch
Data: NVD (public domain), CISA KEV (CC0), FIRST EPSS, OSV.dev / GitHub Advisory Database (CC-BY 4.0) · This database lists affected versions and fixes only. It never hosts or links exploit code.