CVE-2025-37827

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-37827
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37827.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-37827
Related
Published
2025-05-08T07:15:53Z
Modified
2025-05-13T10:53:02.820913Z
Summary
[none]
Details

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 _btrfsaddfreespace_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: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:btrfsaddfreespacezoned.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> ? _diebody.cold+0x19/0x27 ? pagefaultoops+0x15c/0x2f0 ? excpagefault+0x7e/0x180 ? asmexcpagefault+0x26/0x30 ? _btrfsaddfreespacezoned.isra.0+0x61/0x1a0 btrfsaddfreespaceasynctrimmed+0x34/0x40 btrfsaddnewfreespace+0x107/0x120 btrfsmakeblockgroup+0x104/0x2b0 btrfscreatechunk+0x977/0xf20 btrfschunkalloc+0x174/0x510 ? srsoreturnthunk+0x5/0x5f btrfsincblockgroupro+0x1b1/0x230 btrfsrelocateblockgroup+0x9e/0x410 btrfsrelocatechunk+0x3f/0x130 btrfsbalance+0x8ac/0x12b0 ? srsoreturnthunk+0x5/0x5f ? srsoreturnthunk+0x5/0x5f ? _kmalloccachenoprof+0x14c/0x3e0 btrfsioctl+0x2686/0x2a80 ? srsoreturnthunk+0x5/0x5f ? ioctlhasperm.constprop.0.isra.0+0xd2/0x120 _x64sysioctl+0x97/0xc0 dosyscall64+0x82/0x160 ? srsoreturnthunk+0x5/0x5f ? _memcgslabfreehook+0x11a/0x170 ? srsoreturnthunk+0x5/0x5f ? kmemcachefree+0x3f0/0x450 ? srsoreturnthunk+0x5/0x5f ? srsoreturnthunk+0x5/0x5f ? syscallexittousermode+0x10/0x210 ? srsoreturnthunk+0x5/0x5f ? dosyscall64+0x8e/0x160 ? sysfsemit+0xaf/0xc0 ? srsoreturnthunk+0x5/0x5f ? srsoreturnthunk+0x5/0x5f ? seqreaditer+0x207/0x460 ? srsoreturnthunk+0x5/0x5f ? vfsread+0x29c/0x370 ? srsoreturnthunk+0x5/0x5f ? srsoreturnthunk+0x5/0x5f ? syscallexittousermode+0x10/0x210 ? srsoreturnthunk+0x5/0x5f ? dosyscall64+0x8e/0x160 ? srsoreturnthunk+0x5/0x5f ? excpagefault+0x7e/0x180 entrySYSCALL64afterhwframe+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---

References

Affected packages

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.27-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1
6.1.99-1
6.1.106-1
6.1.106-2
6.1.106-3
6.1.112-1
6.1.115-1
6.1.119-1
6.1.123-1
6.1.124-1
6.1.128-1
6.1.129-1
6.1.133-1
6.1.135-1
6.1.137-1
6.3.1-1~exp1
6.3.2-1~exp1
6.3.4-1~exp1
6.3.5-1~exp1
6.3.7-1~bpo12+1
6.3.7-1
6.3.11-1
6.4~rc6-1~exp1
6.4~rc7-1~exp1
6.4.1-1~exp1
6.4.4-1~bpo12+1
6.4.4-1
6.4.4-2
6.4.4-3~bpo12+1
6.4.4-3
6.4.11-1
6.4.13-1
6.5~rc4-1~exp1
6.5~rc6-1~exp1
6.5~rc7-1~exp1
6.5.1-1~exp1
6.5.3-1~bpo12+1
6.5.3-1
6.5.6-1
6.5.8-1
6.5.10-1~bpo12+1
6.5.10-1
6.5.13-1
6.6.3-1~exp1
6.6.4-1~exp1
6.6.7-1~exp1
6.6.8-1
6.6.9-1
6.6.11-1
6.6.13-1~bpo12+1
6.6.13-1
6.6.15-1
6.6.15-2
6.7-1~exp1
6.7.1-1~exp1
6.7.4-1~exp1
6.7.7-1
6.7.9-1
6.7.9-2
6.7.12-1~bpo12+1
6.7.12-1
6.8.9-1
6.8.11-1
6.8.12-1~bpo12+1
6.8.12-1
6.9.2-1~exp1
6.9.7-1~bpo12+1
6.9.7-1
6.9.8-1
6.9.9-1
6.9.10-1~bpo12+1
6.9.10-1
6.9.11-1
6.9.12-1
6.10-1~exp1
6.10.1-1~exp1
6.10.3-1
6.10.4-1
6.10.6-1~bpo12+1
6.10.6-1
6.10.7-1
6.10.9-1
6.10.11-1~bpo12+1
6.10.11-1
6.10.12-1
6.11~rc4-1~exp1
6.11~rc5-1~exp1
6.11-1~exp1
6.11.2-1
6.11.4-1
6.11.5-1~bpo12+1
6.11.5-1
6.11.6-1
6.11.7-1
6.11.9-1
6.11.10-1~bpo12+1
6.11.10-1
6.12~rc6-1~exp1
6.12.3-1
6.12.5-1
6.12.6-1
6.12.8-1
6.12.9-1~bpo12+1
6.12.9-1
6.12.9-1+alpha
6.12.10-1
6.12.11-1
6.12.11-1+alpha
6.12.11-1+alpha.1
6.12.12-1~bpo12+1
6.12.12-1
6.12.13-1
6.12.15-1
6.12.16-1
6.12.17-1
6.12.19-1
6.12.20-1
6.12.21-1
6.12.22-1~bpo12+1
6.12.22-1
6.12.25-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}