{"id":"CVE-2026-142941","summary":"ocfs2: fix deadlock in inline-data truncate transactions","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix deadlock in inline-data truncate transactions\n\nUpdating an inode xattr can cause an ABBA deadlock with inline file\ntruncation:\n\n  ocfs2_truncate_file()\n    down_write(&oi-\u003eip_alloc_sem)\n    ocfs2_truncate_inline()\n      ocfs2_start_trans()\n\n  ocfs2_xattr_set()\n    ocfs2_start_trans()\n    ocfs2_xattr_ibody_set()\n      down_write(&oi-\u003eip_alloc_sem)\n\nThe xattr set path starts the merged transaction before the inode-body\nxattr helper acquires ip_alloc_sem, reversing the ip_alloc_sem -\u003e\ntransaction order used by the allocation and truncate paths.  The\ntransaction merge in commit 85db90e77806 (\"ocfs2/xattr: Merge xattr set\ntransaction.\") introduced this ordering.\n\nFix it by acquiring ip_alloc_sem once in ocfs2_xattr_set(), before xattr\npreparation, allocation reservations and ocfs2_start_trans(), and removing\nthe per-helper acquisition from ocfs2_xattr_ibody_find(),\nocfs2_xattr_ibody_set() and ocfs2_xattr_create_index_block().  These\nhelpers now assert via lockdep that the caller holds ip_alloc_sem.\n\nocfs2_xattr_set_handle(), which only sets initial ACL or security xattrs\non unpublished inodes inside the create transaction, takes ip_alloc_sem\nunder a dedicated lockdep subclass so that the assertions hold without\ncreating a transaction -\u003e ip_alloc_sem cycle against the ip_alloc_sem -\u003e\ntransaction order.  The inode is unpublished, so the acquisition can never\ncontend.\n\nThis keeps the established ip_alloc_sem -\u003e transaction order and makes the\nlocking unconditional, so lockdep can verify a single plain ordering\ninstead of conditional acquisitions.","modified":"2026-12-03T05:00:51.519808335Z","published":"2026-12-03T03:26:10.966Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142941.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1974916a5336c2ae0eca2be35272b5f2c7dc5369"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1ad15ef839a9a4f34cd7614944064729b24ccff6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1f6e76cd8ec05e45876da0851b5b8b4a01a33d49"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4421c714ad802d8b899924968fd27e4e08af71a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/589b8fba927628d2e6ade31f3a1d51f8aa5881dc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7e76e1eae6d60c550f3b3bc949544ed7cc841e3d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c204bf5ac3eeb66648904d0374d6f7b84d843aac"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fac6efd385b6ef1837db55bb245a29aaa805e2be"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142941.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142941"}],"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"},{"fixed":"1974916a5336c2ae0eca2be35272b5f2c7dc5369"},{"fixed":"7e76e1eae6d60c550f3b3bc949544ed7cc841e3d"},{"fixed":"c204bf5ac3eeb66648904d0374d6f7b84d843aac"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142941.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}}],"schema_version":"1.9.2"}