CVE & CISA-KEV Catalog

CVE-2025-21852

MEDIUM
5.5
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: net: Add rx_skb of kfree_skb to raw_tp_null_args[]. Yan Zhai reported a BPF prog could trigger a null-ptr-deref [0] in trace_kfree_skb if the prog does not check if rx_sk is NULL. Commit c53795d48ee8 ("net: add rx_sk to trace_kfree_skb") added rx_sk to trace_kfree_skb, but rx_sk is optional and could be NULL. Let's add kfree_skb to raw_tp_null_args[] to let the BPF verifier validate such a prog and prevent the issue. Now we fail to load such a prog: libbpf: prog 'drop': -- BEGIN PROG LOAD LOG -- 0: R1=ctx() R10=fp0 ; int BPF_PROG(drop, struct sk_buff *skb, void *location, @ kfree_skb_sk_null.bpf.c:21 0: (79) r3 = *(u64 *)(r1 +24) func 'kfree_skb' arg3 has btf_id 5253 type STRUCT 'sock' 1: R1=ctx() R3_w=trusted_ptr_or_null_sock(id=1) ; bpf_printk("sk: %d, %d\n", sk, sk->__sk_common.skc_family); @ kfree_skb_sk_null.bpf.c:24 1: (69) r4 = *(u16 *)(r3 +16) R3 invalid mem access 'trusted_ptr_or_null_' processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 -- END PROG LOAD LOG -- Note this fix requires commit 838a10bd2ebf ("bpf: Augment raw_tp arguments with PTR_MAYBE_NULL"). [0]: BUG: kernel NULL pointer dereference, address: 0000000000000010 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 0 P4D 0 PREEMPT SMP RIP: 0010:bpf_prog_5e21a6db8fcff1aa_drop+0x10/0x2d Call Trace: <TASK> ? __die+0x1f/0x60 ? page_fault_oops+0x148/0x420 ? search_bpf_extables+0x5b/0x70 ? fixup_exception+0x27/0x2c0 ? exc_page_fault+0x75/0x170 ? asm_exc_page_fault+0x22/0x30 ? bpf_prog_5e21a6db8fcff1aa_drop+0x10/0x2d bpf_trace_run4+0x68/0xd0 ? unix_stream_connect+0x1f4/0x6f0 sk_skb_reason_drop+0x90/0x120 unix_stream_connect+0x1f4/0x6f0 __sys_connect+0x7f/0xb0 __x64_sys_connect+0x14/0x20 do_syscall_64+0x47/0xc30 entry_SYSCALL_64_after_hwframe+0x4b/0x53

How to fix

Remediation Available
linuxDebian
Fixed in:6.12.17-1CVE-2025-21852
Fixed in:6.12.17-1CVE-2025-21852
linux-azure-6.11Ubuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-gcp-6.11Ubuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-hwe-6.11Ubuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-image-6.11.0-1014-lowlatencyUbuntu
Fixed in:6.11.0-1014.15~24.04.1USN-7521-3
linux-image-6.11.0-1014-lowlatency-64kUbuntu
Fixed in:6.11.0-1014.15~24.04.1USN-7521-3
linux-image-6.11.0-1015-azureUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-6.11.0-1015-azure-fdeUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-6.11.0-1015-gcpUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-6.11.0-1015-gcp-64kUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-6.11.0-1022-oemUbuntu
Fixed in:6.11.0-1022.22USN-7521-1
linux-image-6.11.0-26-genericUbuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-image-6.11.0-26-generic-64kUbuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-image-azureUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-azure-fdeUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-gcpUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-gcp-64kUbuntu
Fixed in:6.11.0-1015.15~24.04.1USN-7521-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-image-lowlatency-64k-hwe-24.04Ubuntu
Fixed in:6.11.0-1014.15~24.04.1USN-7521-3
linux-image-lowlatency-hwe-24.04Ubuntu
Fixed in:6.11.0-1014.15~24.04.1USN-7521-3
linux-image-oem-24.04bUbuntu
Fixed in:6.11.0-1022.22USN-7521-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.11.0-26.26~24.04.1USN-7521-1
linux-lowlatency-hwe-6.11Ubuntu
Fixed in:6.11.0-1014.15~24.04.1USN-7521-3
linux-oem-6.11Ubuntu
Fixed in:6.11.0-1022.22USN-7521-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.20%probability of exploitation in 30 days
10thpercentile

Low risk: more likely to be exploited than 10% of all known CVEs.

References

Related Vulnerabilities

Other CWE-476 (NULL Pointer Dereference) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2023-21758High7.592%-Fix
CVE-2023-21547High7.588%-Fix
CVE-2014-3470Medium4.386%-Fix
CVE-2021-44224High8.282%-Fix
CVE-2016-0742High7.582%-Fix
CVE-2009-1386Medium5.080%-Fix
Embed a live status badge for CVE-2025-21852
CVE-2025-21852 severity badge

Markdown

[![CVE-2025-21852](https://tridentstack.com/cve/badge/CVE-2025-21852.svg)](https://tridentstack.com/cve/CVE-2025-21852)

HTML

<a href="https://tridentstack.com/cve/CVE-2025-21852"><img src="https://tridentstack.com/cve/badge/CVE-2025-21852.svg" alt="CVE-2025-21852"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-10-01.