CVE
CVE-2025-21858
CNA description
In the Linux kernel, the following vulnerability has been resolved: geneve: Fix use-after-free in geneve_find_dev(). syzkaller reported a use-after-free in geneve_find_dev() [0] without repro. geneve_configure() links struct geneve_dev.next to net_generic(net, geneve_net_id)->geneve_list. The net here could differ from dev_net(dev) if IFLA_NET_NS_PID, IFLA_NET_NS_FD, or IFLA_TARGET_NETNSID is set. When dev_net(dev) is dismantled, geneve_exit_batch_rtnl() finally calls unregister_netdevice_queue() for each dev in the netns, and later the dev is freed. However, its geneve_dev.next is still linked to the backend UDP socket netns. Then, use-after-free will occur when another geneve dev is created in the netns. Let's call geneve_dellink() instead in geneve_destroy_tunnels(). [0]: BUG: KASAN: slab-use-after-free in geneve_find_dev drivers/net/geneve.c:1295 [inline] BUG: KASAN: slab-use-after-free in geneve_configure+0x234/0x858 drivers/net/geneve.c:1343 Read of size 2 at addr ffff000054d6ee24 by task syz.1.4029/13441 CPU: 1 UID: 0 PID: 13441 Comm: syz.1.4029 Not tainted 6.13.0-g0ad9617c78ac #24 dc35ca22c79fb82e8e7bc5c9c9adafea898b1e3d Hardware name: linux,dummy-virt (DT) Call trace: show_stack+0x38/0x50 arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xbc/0x108 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x16c/0x6f0 mm/kasan/report.c:489 kasan_report+0xc0/0x120 mm/kasan/report.c:602 __asan_report_load2_noabort+0x20/0x30 mm/kasan/report_generic.c:379 geneve_find_dev drivers/net/geneve.c:1295 [inline] geneve_configure+0x234/0x858 drivers/net/geneve.c:1343 geneve_newlink+0xb8/0x128 drivers/net/geneve.c:1634 rtnl_newlink_create+0x23c/0x868 net/core/rtnetlink.c:3795 __rtnl_newlink net/core/rtnetlink.c:3906 [inline] rtnl_newlink+0x1054/0x1630 net/core/rtnetlink.c:4021 rtnetlink_rcv_msg+0x61c/0x918 net/core/rtnetlink.c:6911 netlink_rcv_skb+0x1dc/0x398…
Affected versions
All Linux kernel vulnerabilities →
- 6.14-rc3This version only
- 6.14-rc2This version only
- 6.14-rc1This version only
- ≥ 6.13, < 6.13.5Fixed in 6.13.5
- ≥ 6.7, < 6.12.17Fixed in 6.12.17
- ≥ 6.2, < 6.6.80Fixed in 6.6.80
- ≥ 4.2, < 6.1.130Fixed in 6.1.130
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/3ce92ca990cfac88a87c61df3cc0b5880e688ecf · Patch
- git.kernel.org/stable/c/5a0538ac6826807d6919f6aecbb8996c2865af2c · Patch
- git.kernel.org/stable/c/788dbca056a8783ec063da3c9d49a3a71c76c283 · Patch
- git.kernel.org/stable/c/904e746b2e7fa952ab8801b303ce826a63153d78 · Patch
- git.kernel.org/stable/c/9593172d93b9f91c362baec4643003dc29802929 · Patch
- git.kernel.org/stable/c/d5e86e27de0936f3cb0a299ce519d993e9cf3886 · Patch
- git.kernel.org/stable/c/da9b0ae47f084014b1e4b3f31f70a0defd047ff3 · Patch
- git.kernel.org/stable/c/f74f6560146714241c6e167b03165ee77a86e316 · 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.