CVE-2024-50014

Source
https://cve.org/CVERecord?id=CVE-2024-50014
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50014.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-50014
Downstream
Related
Published
2024-10-21T18:54:05.764Z
Modified
2026-03-20T12:39:31.539162Z
Summary
ext4: fix access to uninitialised lock in fc replay path
Details

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix access to uninitialised lock in fc replay path

The following kernel trace can be triggered with fstest generic/629 when executed against a filesystem with fast-commit feature enabled:

INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 0 PID: 866 Comm: mount Not tainted 6.10.0+ #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x66/0x90 registerlockclass+0x759/0x7d0 __lock_acquire+0x85/0x2630 ? __findgetblock+0xb4/0x380 lock_acquire+0xd1/0x2d0 ? __ext4journalgetwriteaccess+0xd5/0x160 rawspin_lock+0x33/0x40 ? __ext4journalgetwriteaccess+0xd5/0x160 __ext4journalgetwriteaccess+0xd5/0x160 ext4reserveinode_write+0x61/0xb0 _ext4markinodedirty+0x79/0x270 ? ext4extreplaysetiblocks+0x2f8/0x450 ext4extreplaysetiblocks+0x330/0x450 ext4fcreplay+0x14c8/0x1540 ? jread+0x88/0x2e0 ? rcuiswatching+0x11/0x40 doonepass+0x447/0xd00 jbd2journalrecover+0x139/0x1b0 jbd2journalload+0x96/0x390 ext4loadandinitjournal+0x253/0xd40 ext4fillsuper+0x2cc6/0x3180 ...

In the replay path there's an attempt to lock sbi->sbdevwblock in function ext4checkbdevwrite_error(). Unfortunately, at this point this spinlock has not been initialized yet. Moving it's initialization to an earlier point in __ext4fillsuper() fixes this splat.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50014.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
01efe93a5aa20a19b390426718dc214898a7c2ec
Fixed
6e35f560daebe40264c95e9a1ab03110d4997df6
Fixed
d157fc20ca5239fd56965a5a8aa1a0e25919891a
Fixed
b002031d585a14eed511117dda8c6452a804d508
Fixed
23dfdb56581ad92a9967bcd720c8c23356af74c1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-50014.json"