CVE-2026-98885: ima: return error early if file xattr cannot be changed
In the Linux kernel, the following vulnerability has been resolved:
ima: return error early if file xattr cannot be changed
During early boot, the filesystem is read-only and any changes to xattrs are not allowed. This fails in case of ext4 because changing xattr starts an ext4 transaction which fails with the following warning.
WARNING: fs/ext4/ext4jbd2.c:75 at ext4journalcheckstart+0x63/0xa0 [ext4], CPU#1: systemd-sysroot/561 CPU: 1 UID: 0 PID: 561 Comm: systemd-sysroot Not tainted 6.19.12-1-default #1 PREEMPT(voluntary) openSUSE Tumbleweed c2dfc3c9d9f6f1233251c5d4410574fe82a348ee Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:ext4journalcheckstart+0x63/0xa0 [ext4] Call Trace: ext4journalstartsb+0x3e/0x180 [ext4 6d025f3bc52c89a957b89a89d211fadf5e9434e1] ext4xattrset+0x104/0x150 [ext4 6d025f3bc52c89a957b89a89d211fadf5e9434e1] vfssetxattr+0x9a/0xd0 vfssetxattrnoperm+0x76/0x1f0 imaappraisemeasurement+0x23e/0xe40 imadpath+0x5a/0xd0 processmeasurement+0xb29/0xc40 ? copyfromkernelnofault+0x21/0xe0 ? fscryptfileopen+0xc0/0xe0 ? ext4fileopen+0x60/0x490 [ext4 6d025f3bc52c89a957b89a89d211fadf5e9434e1] ? bpfprog31efb7c56239148brestrictfilesystems+0xab/0x126 ? bpfprogexit+0x23/0xd0 ? bpftrampexit+0xd/0x50 ? bpftrampoline6442530367+0x9f/0xea imafilecheck+0x57/0x80 securityfilepostopen+0x50/0xf0 pathopenat+0x493/0x1650 dofilpopen+0xc7/0x170
Detect the state of the file early and return the error.