Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-21658— btrfs: avoid NULL pointer dereference if no valid extent tree

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在代码问题漏洞,该漏洞源于btrfs模块在scrub操作中未检查extent tree的有效性。这可能导致空指针解引用或系统崩溃。

AI Predicted 6.5 Difficulty: Hard EPSS 0.20% · P10

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 42437a6386ffeaaf200731e73d723ea491f3fe7d< 24b85a8b0310e0144da9ab30be42e87e6476638a affected
42437a6386ffeaaf200731e73d723ea491f3fe7d< aee5f69f3e6cd82bfefaca1b70b40b6cd8f3f784 affected
42437a6386ffeaaf200731e73d723ea491f3fe7d< 6aecd91a5c5b68939cf4169e32bc49f3cd2dd329 affected
5.11 affected
< 5.11 unaffected
6.6.72≤ 6.6.* unaffected
6.12.10≤ 6.12.* unaffected
6.13≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-21658

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
btrfs: avoid NULL pointer dereference if no valid extent tree
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: avoid NULL pointer dereference if no valid extent tree [BUG] Syzbot reported a crash with the following call trace: BTRFS info (device loop0): scrub: started on devid 1 BUG: kernel NULL pointer dereference, address: 0000000000000208 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 106e70067 P4D 106e70067 PUD 107143067 PMD 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 UID: 0 PID: 689 Comm: repro Kdump: loaded Tainted: G O 6.13.0-rc4-custom+ #206 Tainted: [O]=OOT_MODULE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:find_first_extent_item+0x26/0x1f0 [btrfs] Call Trace: <TASK> scrub_find_fill_first_stripe+0x13d/0x3b0 [btrfs] scrub_simple_mirror+0x175/0x260 [btrfs] scrub_stripe+0x5d4/0x6c0 [btrfs] scrub_chunk+0xbb/0x170 [btrfs] scrub_enumerate_chunks+0x2f4/0x5f0 [btrfs] btrfs_scrub_dev+0x240/0x600 [btrfs] btrfs_ioctl+0x1dc8/0x2fa0 [btrfs] ? do_sys_openat2+0xa5/0xf0 __x64_sys_ioctl+0x97/0xc0 do_syscall_64+0x4f/0x120 entry_SYSCALL_64_after_hwframe+0x76/0x7e </TASK> [CAUSE] The reproducer is using a corrupted image where extent tree root is corrupted, thus forcing to use "rescue=all,ro" mount option to mount the image. Then it triggered a scrub, but since scrub relies on extent tree to find where the data/metadata extents are, scrub_find_fill_first_stripe() relies on an non-empty extent root. But unfortunately scrub_find_fill_first_stripe() doesn't really expect an NULL pointer for extent root, it use extent_root to grab fs_info and triggered a NULL pointer dereference. [FIX] Add an extra check for a valid extent root at the beginning of scrub_find_fill_first_stripe(). The new error path is introduced by 42437a6386ff ("btrfs: introduce mount option rescue=ignorebadroots"), but that's pretty old, and later commit b979547513ff ("btrfs: scrub: introduce helper to find and fill sector info for a scrub_stripe") changed how we do scrub. So for kernels older than 6.6, the fix will need manual backport.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 代码问题漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在代码问题漏洞,该漏洞源于btrfs模块在scrub操作中未检查extent tree的有效性。这可能导致空指针解引用或系统崩溃。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 42437a6386ffeaaf200731e73d723ea491f3fe7d ~ 24b85a8b0310e0144da9ab30be42e87e6476638a -
Linux Linux 5.11 -

II. Public POCs for CVE-2025-21658

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-21658

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-21658 (3)

Same Patch Batch · Linux · 2025-01-21 · 25 CVEs total

CVE-2025-21663 10.0 CRITICAL net: stmmac: dwmac-tegra: Read iommu stream id from device tree
CVE-2024-57932 9.8 CRITICAL gve: guard XDP xmit NDO on existence of xdp queues
CVE-2024-57936 9.8 CRITICAL RDMA/bnxt_re: Fix max SGEs for the Work Request
CVE-2025-21659 8.1 HIGH netdev: prevent accessing NAPI instances from another namespace
CVE-2025-21664 7.8 HIGH dm thin: make get_first_thin use rcu-safe list first function
CVE-2025-21661 7.8 HIGH gpio: virtuser: fix missing lookup table cleanups
CVE-2024-57945 7.8 HIGH riscv: mm: Fix the out of bound issue of vmemmap address
CVE-2024-57943 exfat: fix the new buffer was not zeroed before writing
CVE-2024-57946 virtio-blk: don't keep queue frozen during system suspend
CVE-2025-21662 net/mlx5: Fix variable not being completed when function returns
CVE-2025-21660 ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked
CVE-2025-21657 sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
CVE-2025-21656 hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur
CVE-2024-57944 iio: adc: ti-ads1298: Add NULL check in ads1298_init
CVE-2024-57930 tracing: Have process_string() also allow arrays
CVE-2024-57942 netfs: Fix ceph copy to cache on write-begin
CVE-2024-57941 netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled
CVE-2024-57940 exfat: fix the infinite loop in exfat_readdir()
CVE-2024-57939 riscv: Fix sleeping in invalid context in die()
CVE-2024-57938 net/sctp: Prevent autoclose integer overflow in sctp_association_init()

Showing top 20 of 25 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-21658

No comments yet


Leave a comment