PT-2026-162735

CVE-2026-138875

·

Publicado

2026-11-30

·

Atualizado

2026-11-30

Descrição por

CVSS 3.1
7.8
Alta
MétricasAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
In the Linux kernel, the following vulnerability has been resolved:
jbd2: don't advance j fc off before the buffer is recorded
jbd2 fc get buf() increments journal->j fc off before jbd2 journal bmap() and getblk() have had a chance to fail. When either does, the slot j fc wbuf[fc off] is never assigned, but j fc off already counts it.
ext4 then fails the fast commit and falls back, and the fallback path reaches jbd2 fc release bufs() via ext4 fc commit -> jbd2 fc end commit fallback -> jbd2 fc end commit -> ext4 fc cleanup. That walks down from j fc off - 1 and put bh()es every slot until it sees NULL, so it also touches the slot that was never written. j fc wbuf comes from a plain kmalloc() and is never zeroed, so a slot used for the first time holds uninitialised heap data.
Advance j fc off only after the buffer head has been stored. That restores the invariant that j fc off covers exactly the filled slots, which is what jbd2 fc release bufs() relies on: the live buffers of the current fast commit sit above the NULLs the previous one released, so stopping at the first NULL is correct.
Reproduced on a KASAN kernel with an ext4 fast commit filesystem on a loop device, truncating the backing file under the live mount so that only the journal's fast-commit region falls past the end of the device. getblk() then fails for the first fast-commit block while the rest of the journal is still addressable, so the journal is not aborted and the fast commit reaches the fallback path. j fc wbuf was poisoned to make the read of the never-written slot visible:
BUG: KASAN: wild-memory-access in jbd2 fc release bufs+0x6b/0xd0 Write of size 4 at addr 5a5a5a5a5a5a5ab2 by task sync/961 jbd2 fc release bufs+0x6b/0xd0 ext4 fc cleanup+0x97/0x830 jbd2 fc end commit+0x37/0xc0 ext4 fc commit+0x524/0x560 ext4 sync file+0x3c4/0x4b0 x64 sys fsync+0x20/0x30
With this patch the same run leaves j fc off at 0 across repeated getblk() failures and completes cleanly.
Explorabilidade
Correção
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾