CVE-2025-39984
NoneCVSS
—
EPSS
0.2%
Published
Oct 15, 2025
CISA due date
—
Cloudanix analysis
A flaw in how the Linux kernel handles network packets for virtual interfaces can cause crashes or allow attackers to gain higher privileges on affected systems.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in the TUN driver's napi->skb pointer after an XDP program frees the original skb during generic XDP processing in skb_pp_cow_data, leading to invalid access in napi_gro_frags and skb_reset_mac_header.
Why it matters to the business
Kernel crashes or potential local privilege escalation on systems using TUN devices with XDP, increasing risk for containerized and virtualized environments; urgency is moderate given low EPSS and no KEV listing but similarity to other container-optimized OS exploits.
How an attack unfolds
An attacker writes crafted packets to a TUN character device, triggering tun_get_user to allocate an skb via napi, run an XDP program that frees the skb, then continue execution that dereferences the stale napi->skb pointer in GRO path; related to other Linux kernel privilege escalation techniques observed in container environments.
How to fix it
Apply the fix from commit 953200d56fc23eebf80a5ad9eed6e2e8a3065093 or equivalent SUSE kgraft-patch-SLE12-SP1_Update_26 version 5-2.1; update Linux kernel to a version containing the napi->skb update after XDP processing.
How to confirm the fix worked
Verify kernel source contains the napi->skb assignment after do_xdp_generic call in tun_get_user; test with packet workloads that attach XDP to TUN devices and confirm absence of KASAN slab-use-after-free reports.
Typical attack path
- Open or create a TUN/TAP device with XDP program attached in generic mode
- Write malicious packet data via tun_chr_write_iter
- Trigger tun_napi_alloc_frags and subsequent XDP processing that frees the skb
- Execute code path reaching napi_gro_frags which accesses the freed skb
- Achieve memory corruption leading to crash or escalation
How to detect it
Inspect kernel logs for KASAN reports referencing tun_get_user, napi_gro_frags, skb_reset_mac_header, and slab-use-after-free; correlate with processes writing to /dev/net/tun and XDP attachment events; review for patterns matching other container privilege-escalation attempts.
- BUG: KASAN: slab-use-after-free in skb_reset_mac_header
- tun_get_user+0x28cb/0x3e20
- napi_gro_frags+0x6e/0x1030
- do_xdp_generic
What your security team should do
- Prioritize kernel updates on systems exposing TUN devices to untrusted workloads
- Monitor for similar privilege-escalation patterns seen in CVE-2025-39946 and related container OS issues
- Disable unnecessary XDP on TUN interfaces where possible until patched
- Review EPSS trend stability and schedule patching within normal change windows given low exploit maturity
The record
In the Linux kernel, the following vulnerability has been resolved: net: tun: Update napi->skb after XDP process The syzbot report a UAF issue: BUG: KASAN: slab-use-after-free in skb_reset_mac_header include/linux/skbuff.h:3150 [inline] BUG: KASAN: slab-use-after-free in napi_frags_skb net/core/gro.c:723 [inline] BUG: KASAN: slab-use-after-free in napi_gro_frags+0x6e/0x1030 net/core/gro.c:758 Read of size 8 at addr ffff88802ef22c18 by task syz.0.17/6079 CPU: 0 UID: 0 PID: 6079 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Call Trace: <TASK> dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 skb_reset_mac_header include/linux/skbuff.h:3150 [inline] napi_frags_skb net/core/gro.c:723 [inline] napi_gro_frags+0x6e/0x1030 net/core/gro.c:758 tun_get_user+0x28cb/0x3e20 drivers/net/tun.c:1920 tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:1996 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Allocated by task 6079: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_mempool_unpoison_object+0xa0/0x170 mm/kasan/common.c:558 kasan_mempool_unpoison_object include/linux/kasan.h:388 [inline] napi_skb_cache_get+0x37b/0x6d0 net/core/skbuff.c:295 __alloc_skb+0x11e/0x2d0 net/core/skbuff.c:657 napi_alloc_skb+0x84/0x7d0 net/core/skbuff.c:811 napi_get_frags+0x69/0x140 net/core/gro.c:673 tun_napi_alloc_frags drivers/net/tun.c:1404 [inline] tun_get_user+0x77c/0x3e20 drivers/net/tun.c:1784 tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:1996 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6079: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4797 skb_pp_cow_data+0xdd8/0x13e0 net/core/skbuff.c:969 netif_skb_check_for_xdp net/core/dev.c:5390 [inline] netif_receive_generic_xdp net/core/dev.c:5431 [inline] do_xdp_generic+0x699/0x11a0 net/core/dev.c:5499 tun_get_user+0x2523/0x3e20 drivers/net/tun.c:1872 tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:1996 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f After commit e6d5dbdd20aa ("xdp: add multi-buff support for xdp running in generic mode"), the original skb may be freed in skb_pp_cow_data() when XDP program was attached, which was allocated in tun_napi_alloc_frags(). However, the napi->skb still point to the original skb, update it after XDP process.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | kernel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-abi-stablelists | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-cross-headers | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-debug-uki-virt | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-devel-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-doc | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-headers | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-tools | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt-addons | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel-matched | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-core | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-extra | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | libperf | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | perf | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | python3-perf | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | rtla | 0 | 6.12.0-124.21.1.el10_1 |
| AlmaLinux:10 | rv | 0 | 6.12.0-124.21.1.el10_1 |
| Linux | Kernel | 6.9.0 | 6.12.50 |
| SUSE:Linux Enterprise High Availability Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_6 | 0 | 1-150700.15.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-64kb | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default-base | 0 | 6.4.0-150700.53.22.1.150700.17.15.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-zfcpdump | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-docs | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-obs-build | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-syms | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-source-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-syms-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.6.1.160000.2.4 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.7.1 |
Related vulnerabilities
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects kernel
- CVE-2025-68287 In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: Fix race… Also affects kernel
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects kernel
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects kernel
- CVE-2025-40185 In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter… Also affects kernel
- CVE-2025-40176 In the Linux kernel, the following vulnerability has been resolved: tls: wait for pending… Also affects kernel
- CVE-2025-40058 In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Disallow… Also affects kernel
- CVE-2025-40047 In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid… Also affects kernel