ocfs2: validate lengths in dlm_mig_lockres_handler
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.109, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: ocfs2: validate lengths in dlm_mig_lockres_handler A node receiving a DLM_MIG_LOCKRES message trusts several fields of the peer-supplied dlm_migratable_lockres without validation. num_locks and lockname_len are bounded only on the sending side, and the message is never checked to actually carry num_locks migratable_lock entries. As a result dlm_process_recovery_data() walks mres->ml[0..num_locks) past the kmalloc(data_len) copy of the message (an out-of-bounds read that ends in a BUG_ON panic), and dlm_init_lockres() copies lockname_len bytes into the fixed 32-byte o2dlm_lockname slab object (a heap out-of-bounds write). Both are reachable by any node in the domain. Validate these fields right after dlm_grab(), before anything uses them -- including the not-joined error path, which already prints mres->lockname with the unbounded lockname_len as a %.*s precision. Reject the message unless lockname_len <= DLM_LOCKID_NAME_MAX, num_locks <= DLM_MAX_MIGRATABLE_LOCKS (the bound the sender already asserts), and the payload is large enough to hold the claimed locks. Conforming recovery and migration messages are unaffected.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in 4a5798253212093b9ff7d90c6cfbe348bcda1594; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in dce05b17db862f47ff60614017abe639b2e71cad; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in 0e999d56917f861f97adb961617b1828c9eb4733; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in 77686fa5bba135252d348e2dacf481fc19f60c41; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in f33041906885f96e190cde54e61ddc69de39e3ee; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in 50c4cc9183e11f83427efbf770f54851f4471c02; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in a8facb1670b4a0612183198e758d9539ef628ed9; From 6714d8e86bf443f6f7af50f9d432025649f091f5 · fixed in b54e03d9b3697d25f4a0063cf717d459c5e3ad94
- Linux Linux
2.6.16
- KernelLinux
From 2.6.16 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4
References 8
git.kernel.org
- stable/c/4a5798253212093b9ff7d90c6cfbe348bcda1594
- stable/c/dce05b17db862f47ff60614017abe639b2e71cad
- stable/c/0e999d56917f861f97adb961617b1828c9eb4733
- stable/c/77686fa5bba135252d348e2dacf481fc19f60c41
- stable/c/f33041906885f96e190cde54e61ddc69de39e3ee
- stable/c/50c4cc9183e11f83427efbf770f54851f4471c02
- stable/c/a8facb1670b4a0612183198e758d9539ef628ed9
- stable/c/b54e03d9b3697d25f4a0063cf717d459c5e3ad94