f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()
f2fs_xattr_advise_set() calls inode_owner_or_capable() with &nop_mnt_idmap before allowing the "system.advise" xattr to be set, instead of the idmap that the VFS passes to the ->set() handler.
f2fs supports idmapped mounts, so on such a mount this checks the caller's fsuid against the unmapped on-disk owner rather than the mapped owner: the actual owner can be wrongly denied with -EPERM and an unrelated caller wrongly allowed. Pass the handler's idmap instead.
From the CVE record · Linux
The Linux kernel's f2fs handler for the system.advise extended attribute uses the wrong owner mapping on idmapped mounts. A local caller setting that attribute can be wrongly denied despite owning the file, while an unrelated caller can be wrongly allowed.
Engineers running Linux with f2fs on idmapped mounts should check their kernel versions; affected versions are not specified.