cve.bz

CVE-2025-21858 linux linux kernel: Use After Free

7.8 highEPSS 0.2%Fix available

High (7.8) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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 net/netlink/af_netlink.c:2543 rtnetlink_rcv+0x34/0x50 net/core/rtnetlink.c:6938 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x618/0x838 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x5fc/0x8b0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x410/0x6f8 net/socket.c:2568 ___sys_sendmsg+0x178/0x1d8 net/socket.c:2622 __sys_sendmsg net/socket.c:2654 [inline] __do_sys_sendmsg net/socket.c:2659 [inline] __se_sys_sendmsg net/socket.c:2657 [inline] __arm64_sys_sendmsg+0x12c/0x1c8 net/socket.c:2657 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x90/0x278 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x13c/0x250 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x54/0x70 arch/arm64/kernel/syscall.c:151 el0_svc+0x4c/0xa8 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x1a0 arch/arm64/kernel/entry.S:600 Allocated by task 13247: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x30/0x68 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x58 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x84/0xa0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4298 [inline] __kmalloc_node_noprof+0x2a0/0x560 mm/slub.c:4304 __kvmalloc_node_noprof+0x9c/0x230 mm/util.c:645 alloc_netdev_mqs+0xb8/0x11a0 net/core/dev.c:11470 rtnl_create_link+0x2b8/0xb50 net/core/rtnetlink.c:3604 rtnl_newlink_create+0x19c/0x868 net/core/rtnetlink.c:3780 __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 net/netlink/af_netlink.c:2543 rtnetlink_rcv+0x34/0x50 net/core/rtnetlink.c:6938 netlink_unicast_kernel net/netlink/af_n ---truncated---

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 16th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-03-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-21858 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-21858?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-21858?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-21858 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.2 and later

Fixed in

ProductRelease lineFixed in
Linux5.45.4.291
Linux5.105.10.235
Linux5.155.15.179
Linux6.16.1.130
Linux6.66.6.80
Linux6.126.12.17
Linux6.136.13.5
Linuxlater releases6.14

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux5.10.237-1DLA-4178-1
Debian11linux-6.16.1.137-1~deb11u1DLA-4193-1
Debian12linux6.1.133-1DEBIAN-CVE-2025-21858 DSA-5900-1
Debian13, 14linux6.12.17-1DEBIAN-CVE-2025-21858
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-21858
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-21858
Ubuntu20.04:LTSlinux5.4.0-216.236UBUNTU-CVE-2025-21858 USN-7516-1
Ubuntu20.04:LTSlinux-aws5.4.0-1146.156UBUNTU-CVE-2025-21858 USN-7516-9
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1084.91~20.04.1UBUNTU-CVE-2025-21858 USN-7510-8
Ubuntu20.04:LTSlinux-azure5.4.0-1151.158UBUNTU-CVE-2025-21858 USN-7516-3
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1089.98~20.04.1UBUNTU-CVE-2025-21858 USN-7510-3
Ubuntu20.04:LTSlinux-bluefield5.4.0-1105.112UBUNTU-CVE-2025-21858 USN-7517-3
Ubuntu20.04:LTSlinux-gcp5.4.0-1149.158UBUNTU-CVE-2025-21858 USN-7516-1
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1083.92~20.04.1UBUNTU-CVE-2025-21858 USN-7512-1
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-21858
Ubuntu20.04:LTSlinux-ibm5.4.0-1092.97UBUNTU-CVE-2025-21858 USN-7516-6
107 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::baseosperf, kernel, bpftool and 30 more0:4.18.0-553.132.1.el8_10RHSA-2026:25121
Red Hatenterprise_linux:8::crbperf-debuginfo, kernel-debuginfo, bpftool-debuginfo and 7 more0:4.18.0-553.132.1.el8_10RHSA-2026:25121
Red Hatenterprise_linux:8::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 12 more0:4.18.0-553.132.1.rt7.473.el8_10RHSA-2026:25120
Red Hatenterprise_linux:8::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 10 more0:4.18.0-553.132.1.rt7.473.el8_10RHSA-2026:25120
Red Hatrhel_aus:8.4::baseos, rhel_eus_long_life:8.4::baseosperf, kernel, bpftool and 21 more0:4.18.0-305.194.1.el8_4RHSA-2026:26535
Red Hatrhel_aus:8.6::baseos, rhel_eus_long_life:8.6::baseosperf, kernel, bpftool and 21 more0:4.18.0-372.196.1.el8_6RHSA-2026:26570
Red Hatrhel_e4s:8.8::baseosperf, kernel, bpftool and 22 more0:4.18.0-477.147.1.el8_8RHSA-2026:26563
Red Hatrhel_tus:8.8::baseosperf, kernel, bpftool and 21 more0:4.18.0-477.147.1.el8_8RHSA-2026:26563
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.47.2SUSE-SU-2025:1180-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.3.1SUSE-SU-2025:01951-1
SUSELinux Enterprise Live Patching 12 SP5kernel-default4.12.14-122.255.1SUSE-SU-2025:1293-1
SUSELinux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_671-8.5.1SUSE-SU-2025:1293-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_101-150600.1.5.1SUSE-SU-2025:1178-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_101-150600.13.5.1SUSE-SU-2025:1180-1
SUSELinux Enterprise Live Patching 15 SP7kernel-livepatch-SLE15-SP7_Update_11-150700.15.3.1SUSE-SU-2025:01951-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-64kb, kernel-source, kernel-default and 1 more6.4.0-150600.23.47.2SUSE-SU-2025:1180-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-default-base6.4.0-150600.23.47.2.150600.12.20.2SUSE-SU-2025:1180-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-64kb, kernel-source, kernel-default and 1 more6.4.0-150700.53.3.1SUSE-SU-2025:01951-1
SUSELinux Enterprise Module for Basesystem 15 SP7kernel-default-base6.4.0-150700.53.3.1.150700.17.2.1SUSE-SU-2025:01951-1
SUSELinux Enterprise Module for Confidential Computing Technical Preview 15 SP6kernel-coco, kernel-syms-coco, kernel-coco_debug and 1 more6.4.0-15061.21.coco15sp6.1SUSE-SU-2025:01919-1
18 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-docs, kernel-syms and 2 more6.4.0-150600.23.47.1SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-64kb, kernel-debug, kernel-source and 3 more6.4.0-150600.23.47.2SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-azure, kernel-source-azure6.4.0-150600.8.34.2SUSE-SU-2025:1177-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.47.2.150600.12.20.2SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.34.1SUSE-SU-2025:1178-1
openSUSELeap 15.6kernel-syms-azure6.4.0-150600.8.34.1SUSE-SU-2025:1177-1
AlmaLinux8kernel-rt, kernel-rt-core, kernel-rt-debug and 7 more4.18.0-553.132.1.rt7.473.el8_10ALSA-2026:25120
AlmaLinux8perf, kernel, bpftool and 22 more4.18.0-553.132.1.el8_10ALSA-2026:25121
Rocky Linux8kernel0:4.18.0-553.132.1.el8_10RLSA-2026:25121
Rocky Linux8kernel0:4.18.0-553.132.1.el8_10.cloud.0.1RXSA-2026:25121
Rocky Linux8kernel-rt0:4.18.0-553.132.1.rt7.473.el8_10RLSA-2026:25120
Azure Linux2kernel5.15.179.1-1AZL-58584
Azure Linux3kernel6.6.82.1-1AZL-58515
Alpaquita23linux-lts6.1.130-r0BELL-CVE-2025-21858
Alpaquita25linux-lts6.12.41-r0BELL-CVE-2025-21858
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-21858

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Enterprise Linux is affected by a Moderate severity use-after-free flaw in the Linux kernel's GENEVE (Generic Network Virtualization Encapsulation) driver. When a GENEVE device is created with a backend UDP socket in a different network namespace (for example via IFLA_NET_NS_PID, IFLA_NET_NS_FD, or IFLA_TARGET_NETNSID), dismantling the device's own network namespace unregisters and frees the device while its geneve_dev structure remains linked in the backend UDP socket namespace's device list. Creating another GENEVE device in that namespace then dereferences the freed memory. A local attacker with the privileges needed to create and configure network devices could exploit this use-after-free to crash the system or potentially achieve other memory-corruption consequences such as privilege escalation. Red Hat Enterprise Linux 8 and 9 kernel and kernel-rt are affected, with fixes being pursued through the delegated maintenance process. Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, and Red Hat In-Vehicle OS are not affected because the vulnerable code is not present in those offerings. While NIST assigns this flaw a CVSS score of 7.8 (High), Red Hat's assessment is Moderate impact (CVSS 7.3, with lower integrity impact), reflecting the local and privileged nature of the attack vector.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8kernel-rt-0:4.18.0-553.132.1.rt7.473.el8_10Fixed 2026-06-10RHSA-2026:25120
Red Hat Enterprise Linux 8kernel-0:4.18.0-553.132.1.el8_10Fixed 2026-06-10RHSA-2026:25121
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportkernel-0:4.18.0-305.194.1.el8_4Fixed 2026-06-17RHSA-2026:26535
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onkernel-0:4.18.0-305.194.1.el8_4Fixed 2026-06-17RHSA-2026:26535
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportkernel-0:4.18.0-372.196.1.el8_6Fixed 2026-06-17RHSA-2026:26570
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onkernel-0:4.18.0-372.196.1.el8_6Fixed 2026-06-17RHSA-2026:26570
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicekernel-0:4.18.0-477.147.1.el8_8Fixed 2026-06-17RHSA-2026:26563
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionskernel-0:4.18.0-477.147.1.el8_8Fixed 2026-06-17RHSA-2026:26563
Red Hat Enterprise Linux 10kernelAffected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 9kernelWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-21858.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-295-16Siemens SIMATIC S7-1500 TM MFP2026-10-13Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed
ICSA-24-102-01Siemens SIMATIC S7-1500 TM MFP2024-04-09Critical ManufacturingSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON