REDHAT-BUG-892330: Low severity util-linux mount vulnerability
This was originally reported by Jann Horn (jannhorn):
mount discloses information about folders not accessible for a user:
$ ls -ld /root/.ssh ls: cannot access /root/.ssh: Permission denied $ ls -ld /root/.foo ls: cannot access /root/.foo: Permission denied
First variant:
$ mount --guess-fstype /root/.ssh/../../dev/sda1 ext4 $ mount --guess-fstype /root/.foo/../../dev/sda1 unknown
Second one:
$ mount /root/.ssh/../../dev/cdrom mount: no medium found on /dev/sr0 $ mount /root/.foo/../../dev/cdrom mount: can't find /root/.foo/../../dev/cdrom in /etc/fstab or /etc/mtab
These issues were, as far as I can see, fixed in the following upstream commits: - 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 - 33c5fd0c5a774458470c86f9d318d8c48a9c9ccb - 5ebbc3865d1e53ef42e5f121c41faab23dd59075 - cc8cc8f32c863f3ae6a8a88e97b47bcd6a21825f
External references: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697464
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 33c5fd0c5a774458470c86f9d318d8c48a9c9ccb - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 5ebbc3865d1e53ef42e5f121c41faab23dd59075 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch cc8cc8f32c863f3ae6a8a88e97b47bcd6a21825f
Event History
Frequently Asked Questions
Who can exploit this issue?
A local user who lacks permission to access a directory can use mount path handling to distinguish properties of paths beneath that directory. The examples involve inaccessible paths under /root.
What information can be disclosed?
The mount --guess-fstype behavior can reveal whether a constructed path resolves to a device with a recognizable filesystem type, such as ext4, versus an unknown result. Mount error messages can also differ depending on whether the inaccessible path ultimately reaches a device path.
How can I check whether a system is affected?
From an unprivileged account, compare mount output for a path traversing an inaccessible directory and containing ../ components with output for a similarly structured nonexistent path. The reported behavior produces distinguishable filesystem-type or error-message results despite direct ls access being denied.
What fixes are identified in the available data?
The issue was reported as fixed by upstream commits 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8, 33c5fd0c5a774458470c86f9d318d8c48a9c9ccb, 5ebbc3865d1e53ef42e5f121c41faab23dd59075, and cc8cc8f32c863f3ae6a8a88e97b47bcd6a21825f.