btrfs: check if root is readonly when setting posix acl
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 353c2ea735e4b54fb6250861e67b51b1bcb47198 · < 01c2f41fc441f75b3f9326443372faceb1cb6638| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: check if root is readonly when setting posix acl
For a filesystem which has btrfs read-only property set to true, all write operations including acl and xattr should be denied. However, acl can still be set even if btrfs ro property is true.
This happens because no function on the set_acl code path checks the root is readonly or not. It was checked in btrfs_setxattr_trans() but got removed in commit 353c2ea735e4 ("btrfs: remove redundant readonly root check in btrfs_setxattr_trans")
That commit didn't check if all the callers properly check the root's read-only flag. A previous fix is commit b51111271b03 ("btrfs: check if root is readonly while setting security xattr").
Always check if the root is read-only before performing the set acl operation.
From the CVE record · Linux
The Linux kernel’s btrfs ACL-setting path does not check whether a filesystem root has its read-only property set. Someone able to set a POSIX ACL can therefore change it despite that property; the input does not specify authentication or user-interaction requirements.
Teams running Linux with btrfs filesystems should check their kernels; affected versions were not specified.