util-linux mount target TOCTOU allows local privilege escalation
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
util-linux is a random collection of Linux utilities. In util-linux 2.17 through 2.41.6 and 2.42 through 2.42.3, and in 2.42.4 when the legacy mount(2) path is used without /proc, restricted non-root mount requests validate an /etc/fstab target before the mount operation re-resolves that pathname. A local low-privileged user authorized by an fstab user or users entry whose target has an attacker-writable ancestor can use renameat2(RENAME_EXCHANGE) to swap a path component and redirect an authorized mount to a root-owned location, such as mounting attacker-controlled content over /etc/sudoers.d, and thereby gain root privileges. Versions 2.41.5 and 2.42.2 pin targets for the new mount API, and 2.42.4 pins legacy targets through /proc/self/fd; the documented legacy fallback without /proc remains affected.
Text from CVE List
Affected versions 2
- util-linuxaffected: >= 2.17, <= 2.41.6CVE List
- util-linuxaffected: >= 2.42, <= 2.42.4CVE List
References 14
- github.com/util-linux/util-linux/commit/0b010025a0e429bc80355c94db86a843395d49e2Fixvia CVE List
- github.com/util-linux/util-linux/commit/0d3d55975aa3492c62fd345eac38f41cd166c0b0Fixvia CVE List
- github.com/util-linux/util-linux/commit/2c773f336134acf016e639abb6f12ba7341fe4b8Fixvia CVE List
- github.com/util-linux/util-linux/commit/39fef62bf3226abb6bb018fa8750afa0327e84b4Fixvia CVE List
- github.com/util-linux/util-linux/commit/472cc3fb2d4d47cca7aab2e0b59eb3fb8a9359ecFixvia CVE List
- github.com/util-linux/util-linux/commit/646fb66603d10a7ac337e14f566f1af48e3107c9Fixvia CVE List
- github.com/util-linux/util-linux/commit/708d1b3c51932dc5ba8082c7368187715e6a8d78Fixvia CVE List
- github.com/util-linux/util-linux/commit/78a860982e036f38fe9c0b3344998df5ac2c2ff5Fixvia CVE List
- github.com/util-linux/util-linux/commit/85d16b341f7232c9dbb4884b632e1e956584bee9Fixvia CVE List
- github.com/util-linux/util-linux/commit/a9508d216eb8977979102782672e0470cc9bf2a2Fixvia CVE List
- github.com/util-linux/util-linux/releases/tag/v2.41.5Fixvia CVE List
- github.com/util-linux/util-linux/releases/tag/v2.42.2Fixvia CVE List
- github.com/util-linux/util-linux/releases/tag/v2.42.4Fixvia CVE List
- github.com/util-linux/util-linux/security/advisories/GHSA-8gj5-72r3-428gAdvisoryvia CVE List