A _lot_ has changed since 2007.
According to Raymond Chen, a MSFT employee:
>There really are only two [UAC] settings.
>* Always notify
>* Meh
https://devblogs.microsoft.com/oldnewthing/20160816-00/?p=94...
Stop giving systemd more ideas.
(/s)
(But seriously, imagine a world where you can't get root because D-Bus crashed.)
Now I'm wondering what its worst case crash behavior is like.
* https://www.openwall.com/tcb/
* https://web.archive.org/web/20030919191907/http://dren.ch:80...
# On a machine where you have root, do the following in a Truecrypt volume:
for maj in {0..4096}; do
for min in {0..1048576}; do
mknod block-${maj}.${min} b $maj $min
mknod char-${maj}.${min} c $maj $min
done
done
chmod a+rwx {block,char}-*
All devices which represent a block device (namely, hard drives and similar media) have some (major, minor) value. There are currently[1] 4096 values for the major number 1048576 for the minor number, so we can just create all of them (or you could just create the first 256 since it's very rare for the number to go above that).And now when you mount the volume on a machine (with needing root, because that's what TrueCrypt allows you to do), the mounted filesystem contains every possible block and character device with read/write permissions for every user on the system. Therefore, one of the block devices (you can check by doing an ls in /dev) will correspond to the root filesystem and the user can now read or write to it directly.
By adding "nodev", the kernel will not permit any user to access character or block device inodes on the filesystem (even if you would normally have permissions).
[1]: https://elixir.bootlin.com/linux/v5.4.3/source/include/linux...
One more reason to switch to podman, which has sane defaults.
Technically, it's only vulnerable on operating systems that support setuid style permissions. That doesn't exist on windows, for example.
If the filesystem just mounted has setuid executables, however, the user can then get around their lack of additional sudo privileges by running the setuid executables.
Although most people seem to use sudo to allow a user to run anything, that's really not how it was intended to be used.
%veracryptusers ALL=(root) NOPASSWD:/usr/bin/veracrypt
An inexperienced systems administrator might use this to allow some users access to the mount command so that users can use their encrypted USB drives to carry around sensitive data, not realizing that through the intricacies of the Linux filesystem this can lead to privilege escalation.Such a config would normally give you sudo, but not a root shell; allowing certain users to use ping floods to test the network by giving them access to the ping command as root, for example, would not expose much security risks other than flooding the network.
a) it seems the point in the report is that Truecrypt allowed to grant this ability without using sudo (I guess either via a daemon or just a setuid executable)
b) iirc in case of other filesystems you can allow users to mount them without being root—which is how removable devices work in unixes. So this goes around the whole sudo/setuid system and probably might be another option for this feature in Truecrypt too.
Lastly, as jeroenhd noted, even with sudo the root privilege can be granted for a script that mounts a volume, or for one particular command. Sudo, by default, doesn't allow the user to add options to the command specified in `sudoers`.