Skip to main content

CVE-2025-37827: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-37827cvecve-2025-37827
Published: Thu May 08 2025 (05/08/2025, 06:26:19 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: zoned: return EIO on RAID1 block group write pointer mismatch There was a bug report about a NULL pointer dereference in __btrfs_add_free_space_zoned() that ultimately happens because a conversion from the default metadata profile DUP to a RAID1 profile on two disks. The stack trace has the following signature: BTRFS error (device sdc): zoned: write pointer offset mismatch of zones in raid1 profile BUG: kernel NULL pointer dereference, address: 0000000000000058 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:__btrfs_add_free_space_zoned.isra.0+0x61/0x1a0 RSP: 0018:ffffa236b6f3f6d0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff96c8132f3400 RCX: 0000000000000001 RDX: 0000000010000000 RSI: 0000000000000000 RDI: ffff96c8132f3410 RBP: 0000000010000000 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000000 R11: 00000000ffffffff R12: 0000000000000000 R13: ffff96c758f65a40 R14: 0000000000000001 R15: 000011aac0000000 FS: 00007fdab1cb2900(0000) GS:ffff96e60ca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000058 CR3: 00000001a05ae000 CR4: 0000000000350ef0 Call Trace: <TASK> ? __die_body.cold+0x19/0x27 ? page_fault_oops+0x15c/0x2f0 ? exc_page_fault+0x7e/0x180 ? asm_exc_page_fault+0x26/0x30 ? __btrfs_add_free_space_zoned.isra.0+0x61/0x1a0 btrfs_add_free_space_async_trimmed+0x34/0x40 btrfs_add_new_free_space+0x107/0x120 btrfs_make_block_group+0x104/0x2b0 btrfs_create_chunk+0x977/0xf20 btrfs_chunk_alloc+0x174/0x510 ? srso_return_thunk+0x5/0x5f btrfs_inc_block_group_ro+0x1b1/0x230 btrfs_relocate_block_group+0x9e/0x410 btrfs_relocate_chunk+0x3f/0x130 btrfs_balance+0x8ac/0x12b0 ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? __kmalloc_cache_noprof+0x14c/0x3e0 btrfs_ioctl+0x2686/0x2a80 ? srso_return_thunk+0x5/0x5f ? ioctl_has_perm.constprop.0.isra.0+0xd2/0x120 __x64_sys_ioctl+0x97/0xc0 do_syscall_64+0x82/0x160 ? srso_return_thunk+0x5/0x5f ? __memcg_slab_free_hook+0x11a/0x170 ? srso_return_thunk+0x5/0x5f ? kmem_cache_free+0x3f0/0x450 ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? syscall_exit_to_user_mode+0x10/0x210 ? srso_return_thunk+0x5/0x5f ? do_syscall_64+0x8e/0x160 ? sysfs_emit+0xaf/0xc0 ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? seq_read_iter+0x207/0x460 ? srso_return_thunk+0x5/0x5f ? vfs_read+0x29c/0x370 ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? syscall_exit_to_user_mode+0x10/0x210 ? srso_return_thunk+0x5/0x5f ? do_syscall_64+0x8e/0x160 ? srso_return_thunk+0x5/0x5f ? exc_page_fault+0x7e/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fdab1e0ca6d RSP: 002b:00007ffeb2b60c80 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fdab1e0ca6d RDX: 00007ffeb2b60d80 RSI: 00000000c4009420 RDI: 0000000000000003 RBP: 00007ffeb2b60cd0 R08: 0000000000000000 R09: 0000000000000013 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb2b6343b R14: 00007ffeb2b60d80 R15: 0000000000000001 </TASK> CR2: 0000000000000058 ---[ end trace 0000000000000000 ]--- The 1st line is the most interesting here: BTRFS error (device sdc): zoned: write pointer offset mismatch of zones in raid1 profile When a RAID1 block-group is created and a write pointer mismatch between the disks in the RAID set is detected, btrfs sets the alloc_offset to the length of the block group marking it as full. Afterwards the code expects that a balance operation will evacuate the data in this block-group and repair the problems. But before this is possible, the new space of this block-group will be accounted in the free space cache. But in __btrfs_ ---truncated---

AI-Powered Analysis

AILast updated: 07/04/2025, 00:10:18 UTC

Technical Analysis

CVE-2025-37827 is a vulnerability identified in the Linux kernel's Btrfs filesystem implementation, specifically related to the handling of zoned block devices configured with RAID1 profiles. The issue arises when a RAID1 block group is created and a write pointer offset mismatch between the disks in the RAID set is detected. In this scenario, Btrfs sets the allocation offset (alloc_offset) to the length of the block group, marking it as full. The kernel expects that a subsequent balance operation will evacuate data from this block group to repair the inconsistency. However, before this balance operation can occur, the new space in this block group is incorrectly accounted for in the free space cache. This leads to a NULL pointer dereference in the function __btrfs_add_free_space_zoned(), causing a kernel crash (kernel oops) due to an invalid memory access at address 0x58. The stack trace indicates that the fault occurs during free space accounting when converting metadata profiles from DUP to RAID1 on two disks. The vulnerability can cause system instability and denial of service (DoS) by crashing the kernel when the affected code path is exercised. Since the flaw is triggered by a mismatch in write pointers on zoned block devices in RAID1, it specifically affects systems using Btrfs with zoned block devices and RAID1 configurations. The vulnerability does not appear to require user interaction or authentication to trigger, but it does require the system to be using the affected Btrfs configurations. No known exploits are reported in the wild as of the publication date. The vulnerability was reserved in April 2025 and published in May 2025, with no CVSS score assigned yet. The technical details and stack trace provide strong evidence that the issue is a kernel NULL pointer dereference leading to a denial of service condition.

Potential Impact

For European organizations, the impact of CVE-2025-37827 can be significant, particularly for those relying on Linux servers with Btrfs filesystems configured on zoned block devices using RAID1 profiles. The primary impact is a denial of service due to kernel crashes, which can lead to system downtime, data unavailability, and potential disruption of critical services. Organizations using Btrfs for storage, especially in data centers, cloud infrastructure, or enterprise environments where zoned block devices (such as SMR drives or Zoned Namespace NVMe devices) are deployed, are at risk. The vulnerability could affect storage reliability and availability, impacting sectors like finance, healthcare, telecommunications, and government services that depend on high-availability Linux systems. Although there is no indication of privilege escalation or data corruption beyond the kernel crash, repeated crashes could lead to operational disruptions and increased recovery costs. The lack of known exploits reduces immediate risk, but the vulnerability's presence in the widely used Linux kernel means that attackers could develop exploits over time. European organizations with strict uptime requirements and regulatory compliance obligations (e.g., GDPR) must consider the risk of service interruptions and potential data access issues.

Mitigation Recommendations

To mitigate CVE-2025-37827, European organizations should take the following specific actions: 1) Apply kernel updates and patches as soon as they become available from Linux distribution vendors or the upstream Linux kernel project. Monitoring vendor advisories for patched kernel versions is critical. 2) Identify systems using Btrfs filesystems on zoned block devices with RAID1 profiles and assess their exposure. If possible, avoid using zoned block devices with RAID1 in Btrfs until patched. 3) Implement proactive monitoring of kernel logs and system stability to detect early signs of this issue, such as Btrfs error messages related to write pointer mismatches or kernel oops events. 4) Consider temporary workarounds such as disabling balance operations or avoiding metadata profile conversions that trigger the bug, if operationally feasible. 5) For critical systems, plan for redundancy and failover strategies to minimize downtime in case of kernel crashes. 6) Engage with hardware vendors to understand the deployment of zoned block devices and coordinate firmware or driver updates that may complement kernel fixes. 7) Conduct thorough testing of kernel updates in staging environments before production deployment to ensure stability and compatibility. These steps go beyond generic advice by focusing on the specific Btrfs configurations and operational practices that expose the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-04-16T04:51:23.950Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9819c4522896dcbd8885

Added to database: 5/21/2025, 9:08:41 AM

Last enriched: 7/4/2025, 12:10:18 AM

Last updated: 8/3/2025, 12:25:04 PM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats