Practical Techniques to Obviate Setuid-to-Root Binaries Bhushan Jain, Chia-Che Tsai, Jitin John, and Donald E. Porter Stony Brook University fbpjain, chitsai, jijjohn,
[email protected] Abstract Net lines of code de-privileged. 12,717 Percentage of deployed Ubuntu and Debian systems that can 89.5% Trusted, setuid-to-root binaries have been a substantial, eliminate the setuid bit. long-lived source of privilege escalation vulnerabilities on Historical exploits that would be unprivileged on Protego. 40/40 Unix systems. Prior work on limiting privilege escalation Performance overheads ≤7.4% has only considered privilege from the perspective of the ad- System calls changed 8 ministrator, neglecting the perspective of regular users—the Table 1. Summary of results. primary reason for having setuid-to-root binaries. The paper presents a study of the current state of setuid- to-root binaries on Linux, focusing on the 28 most com- vice without involving a human administrator. Because the monly deployed setuid binaries in the Debian and Ubuntu mount binary must issue the mount() system call, which distributions. This study reveals several points where Linux requires root privilege (or the CAP SYS ADMIN capability), kernel policies and abstractions are a poor fit for the policies the mount binary is inadvertently empowered to issue many desired by the administrator, and root privilege is used to more privileged system calls. For instance, if an attacker can create point solutions. The majority of these point solutions exploit an input parsing bug in mount, she might be able to address 8 system calls that require administrator privilege, change the root user’s password, install a rootkit, or replace but also export functionality required by unprivileged users.