CVE-2026-142941

Source
https://cve.org/CVERecord?id=CVE-2026-142941
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142941.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-142941
Published
2026-12-03T03:26:10Z
Modified
2026-12-03T05:00:51Z
Summary
ocfs2: fix deadlock in inline-data truncate transactions
Details

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

ocfs2: fix deadlock in inline-data truncate transactions

Updating an inode xattr can cause an ABBA deadlock with inline file truncation:

ocfs2_truncate_file() down_write(&oi->ip_alloc_sem) ocfs2_truncate_inline() ocfs2_start_trans()

ocfs2_xattr_set() ocfs2_start_trans() ocfs2_xattr_ibody_set() down_write(&oi->ip_alloc_sem)

The xattr set path starts the merged transaction before the inode-body xattr helper acquires ip_alloc_sem, reversing the ip_alloc_sem -> transaction order used by the allocation and truncate paths. The transaction merge in commit 85db90e77806 ("ocfs2/xattr: Merge xattr set transaction.") introduced this ordering.

Fix it by acquiring ip_alloc_sem once in ocfs2_xattr_set(), before xattr preparation, allocation reservations and ocfs2_start_trans(), and removing the per-helper acquisition from ocfs2_xattr_ibody_find(), ocfs2_xattr_ibody_set() and ocfs2_xattr_create_index_block(). These helpers now assert via lockdep that the caller holds ip_alloc_sem.

ocfs2_xattr_set_handle(), which only sets initial ACL or security xattrs on unpublished inodes inside the create transaction, takes ip_alloc_sem under a dedicated lockdep subclass so that the assertions hold without creating a transaction -> ip_alloc_sem cycle against the ip_alloc_sem -> transaction order. The inode is unpublished, so the acquisition can never contend.

This keeps the established ip_alloc_sem -> transaction order and makes the locking unconditional, so lockdep can verify a single plain ordering instead of conditional acquisitions.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142941.json"
}
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
85db90e77806d48a19fda77dabe8897d369a1710
Fixed
589b8fba927628d2e6ade31f3a1d51f8aa5881dc
Fixed
fac6efd385b6ef1837db55bb245a29aaa805e2be
Fixed
4421c714ad802d8b899924968fd27e4e08af71a2
Fixed
1ad15ef839a9a4f34cd7614944064729b24ccff6
Fixed
1f6e76cd8ec05e45876da0851b5b8b4a01a33d49
Show 3 more events Show fewer events
Fixed
1974916a5336c2ae0eca2be35272b5f2c7dc5369
Fixed
7e76e1eae6d60c550f3b3bc949544ed7cc841e3d
Fixed
c204bf5ac3eeb66648904d0374d6f7b84d843aac

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142941.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.29
Fixed
5.10.275
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.226
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.193
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.163
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.119
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.65
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142941.json"