Linux
fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy()
In the Linux kernel, the following vulnerability has been resolved: fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy() fscrypt_ioctl_set_policy() calls inode_owner_or_capable() with &nop_mnt_idmap before allowing an encryption policy to be set, instead of the idmap of the mount the ioctl was issued on. fscrypt is used by filesystems that support idmapped mounts (e.g. ext4, f2fs), so on such a mount this compares the caller's fsuid against the unmapped on-disk owner rather than the mapped owner: the actual owner can be wrongly denied with -EACCES and an unrelated caller wrongly allowed. Use file_mnt_idmap(filp) instead.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 174633a468817a49bd474bcfc9067c84e54efe68
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 0baeb730044981f5ec5fb7d62a3763835ea606f6
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 33b7e810ce09955aa02f3b632455cf5e7ac990a9
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 6a67c460b12315033268dce597546984fe5739e7
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 653e888a24c87b8bbeab44d7e558a1c1a3641088
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < 98516ba8b817f34e86bdd7a5b7a383cff75c3ddf
- >= 14f3db5542e62bcf6fe088a09760ac52d55306c5, < cf6c993c0feca7984797e634deba3c80342e199a
Fixed in 174633a468817a49bd474bcfc9067c84e54efe68, 0baeb730044981f5ec5fb7d62a3763835ea606f6, 33b7e810ce09955aa02f3b632455cf5e7ac990a9, 6a67c460b12315033268dce597546984fe5739e7, 653e888a24c87b8bbeab44d7e558a1c1a3641088, 98516ba8b817f34e86bdd7a5b7a383cff75c3ddf, cf6c993c0feca7984797e634deba3c80342e199a
- 5.12
Fixed in 0, 5.15.217, 6.1.184, 6.6.152, 6.12.104, 6.18.45, 7.1.9, 7.2
Mitigation
Upgrade Linux to 174633a468817a49bd474bcfc9067c84e54efe68 or 0baeb730044981f5ec5fb7d62a3763835ea606f6 or 33b7e810ce09955aa02f3b632455cf5e7ac990a9 or 6a67c460b12315033268dce597546984fe5739e7 or 653e888a24c87b8bbeab44d7e558a1c1a3641088 or 98516ba8b817f34e86bdd7a5b7a383cff75c3ddf or cf6c993c0feca7984797e634deba3c80342e199a or later.
Upgrade Linux to 0 or 5.15.217 or 6.1.184 or 6.6.152 or 6.12.104 or 6.18.45 or 7.1.9 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.