Source: linux
Version: 6.1.192-1
Severity: important
X-Debbugs-Cc: [email protected]

Hi,

Since 6.1.192-1 (DLA-4906-1) we get ext4 oopses on bookworm VMs.
After the oops, the task dies with a journal handle open. From then on,
every write to that filesystem blocks in jbd2, and only a reboot gets
the machine back. In our case that was both / and a second ext4 data
volume.

We provision fresh bookworm VMs on OpenStack, dist-upgrade them and
reboot into the new kernel. The oops shows up during the next large
package install, here dpkg unpacking a ~1 GB package. It doesn't happen
on every VM. We didn't see it on the previous bookworm-security kernel.

BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 2 PID: 25348 Comm: dpkg Not tainted 6.1.0-55-cloud-amd64 #1  Debian 
6.1.192-1
Hardware name: OpenStack Foundation OpenStack Nova, BIOS 1.10.2-1ubuntu1 
04/01/2014
RIP: 0010:ext4_mb_load_buddy_gfp+0xbc/0x380
Code: 89 44 24 08 f7 3c 24 48 63 d8 89 54 24 0c ba 01 00 00 00 48 89 de e8 33 
d8 e3 ff 49 89 c7 48 3d 00 f0 ff ff 0f 87 28 01 00 00 <48> 8b 00 a8 04 0f 84 12 
01 00 00 49 8b
RAX: 0000000000000000 RBX: 0000000000000040 RCX: 0000000000000003
Call Trace:
 <TASK>
 ext4_mb_regular_allocator+0x29e/0xce0
 ext4_mb_new_blocks+0x820/0x1240
 ext4_ext_map_blocks+0x3c7/0x1990
 ext4_map_blocks+0x1b6/0x5f0
 ext4_getblk+0x9a/0x230
 ext4_bread+0xb/0x70
 ext4_append+0xa5/0x1b0
 ext4_init_new_dir+0xd4/0x170
 ext4_mkdir+0x10f/0x330
 vfs_mkdir+0x9f/0x140
 do_mkdirat+0x142/0x170
 __x64_sys_mkdir+0x45/0x60
 do_syscall_64+0x5d/0x90
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8
 </TASK>

A second oops at the same RIP followed shortly after, this time from
mysqld on the data volume. After that, jbd2/vda1-8 and jbd2/vdb-8 sit
in jbd2_journal_wait_updates, and every writer waits in
wait_transaction_locked.

The faulting instruction is right after an IS_ERR() check
(cmp $0xfffffffffffff000,%rax) on what is a NULL folio. 6.1.191
brought in these mballoc backports:

  ext4: convert bd_bitmap_page to bd_bitmap_folio
  ext4: convert bd_buddy_page to bd_buddy_folio
  ext4: fix e4b bitmap inconsistency reports (CVE-2026-45942)

On 6.1, __filemap_get_folio() returns NULL rather than an ERR_PTR, so
the IS_ERR() checks from the backport don't catch it. The same set of
patches was dropped from 6.1.167-rc1 in March, after Mark Brown
bisected an identical oops and Ted Ts'o reproduced it on x86_64:

  https://lkml.iu.edu/2603.3/01511.html
  https://lkml.iu.edu/hypermail/linux/kernel/2603.3/02704.html

It came back with 6.1.191. Another project ran into the same oops on
6.1.191 and mentions a 6.1.y fix being queued upstream that isn't in
6.1.192. I haven't found that patch on lore myself:

  https://github.com/sporevm/kernels/pull/13

As a workaround we pin linux-image-* and linux-headers-* matching
6.1.19[12] to -1.

Timon

Reply via email to