In the Linux kernel, the following vulnerability has been resolved: fs:
relax mount_setattr() permission checks When we added mount_setattr() I
added additional checks compared to the legacy do_reconfigure_mnt() and
do_change_type() helpers used by regular mount(2). If that mount had a
parent then verify that the caller and the mount namespace the mount is
attached to match and if not make sure that it’s an anonymous mount. The
real rootfs falls into neither category. It is neither an anoymous mount
because it is obviously attached to the initial mount namespace but it also
obviously doesn’t have a parent mount. So that means legacy mount(2) allows
changing mount properties on the real rootfs but mount_setattr(2) blocks
this. I never thought much about this but of course someone on this planet
of earth changes properties on the real rootfs as can be seen in [1]. Since
util-linux finally switched to the new mount api in 2.39 not so long ago it
also relies on mount_setattr() and that surfaced this issue when Fedora 39
finally switched to it. Fix this.
Author | Note |
---|---|
Priority reason: This issue is loosening restrictions on setting mount attributes on / after it has already been mounted, matching existing behavior. | |
sbeattie | the issue being addressed here loosens the restrictions on remounting /, to match prior allowed behavior. The only potential security impact is if, as part of the boot process, an adjustment of / attributes was expected to occur that didn’t, enabling an unexpected operation to be able to occur. |
OS | Version | Architecture | Package | Version | Filename |
---|---|---|---|---|---|
ubuntu | 18.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 20.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 22.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 23.10 | noarch | linux | < any | UNKNOWN |
ubuntu | 24.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 14.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 16.04 | noarch | linux | < any | UNKNOWN |
ubuntu | 18.04 | noarch | linux-aws | < any | UNKNOWN |
ubuntu | 20.04 | noarch | linux-aws | < any | UNKNOWN |
ubuntu | 22.04 | noarch | linux-aws | < any | UNKNOWN |
git.kernel.org/linus/46f5ab762d048dad224436978315cbc2fa79c630 (6.8-rc5)
git.kernel.org/stable/c/2a7a31e1fb9717845d9d5e2a8c6e48848147801e
git.kernel.org/stable/c/31f71f2d7a081fc6c6bdf06865beedf6db5b0ca4
git.kernel.org/stable/c/46f5ab762d048dad224436978315cbc2fa79c630
git.kernel.org/stable/c/95de4ad173ca0e61034f3145d66917970961c210
launchpad.net/bugs/cve/CVE-2024-26821
nvd.nist.gov/vuln/detail/CVE-2024-26821
security-tracker.debian.org/tracker/CVE-2024-26821
www.cve.org/CVERecord?id=CVE-2024-26821