diff options
author | Karel Zak | 2012-11-26 14:30:22 +0100 |
---|---|---|
committer | Karel Zak | 2012-11-26 16:24:54 +0100 |
commit | 5ebbc3865d1e53ef42e5f121c41faab23dd59075 (patch) | |
tree | c66387a40ab7d9e14f48ce508a11e9f6c665d8f9 /sys-utils/umount.c | |
parent | lib/canonicalize: add canonicalize_path_restricted() to canonicalize without ... (diff) | |
download | kernel-qcow2-util-linux-5ebbc3865d1e53ef42e5f121c41faab23dd59075.tar.gz kernel-qcow2-util-linux-5ebbc3865d1e53ef42e5f121c41faab23dd59075.tar.xz kernel-qcow2-util-linux-5ebbc3865d1e53ef42e5f121c41faab23dd59075.zip |
mount: sanitize paths from non-root users
$ mount /root/.ssh/../../dev/sda2
mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot
this is too promiscuous. It seems better to ignore on command line
specified paths which are not resolve-able for non-root users.
Fixed version:
$ mount /root/.ssh/../../dev/sda2
mount: /root/.ssh/../../dev/sda2: Permission denied
$ mount /dev/sda2
mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot
Note that this bug has no relation to mount(2) permissions evaluation
in suid mode. The way how non-root user specifies paths on command
line is completely irrelevant for comparison with fstab entries.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/umount.c')
0 files changed, 0 insertions, 0 deletions