Sudo chroot Zafiyeti: Modern Linux Sistemlerinde Tehlikeli Bir Ya
The text describes a privilege escalation risk when sudo is configured to allow a user to run chroot without a password. An attacker with that sudo permission can enter a chroot jail that still runs with root privileges and, if /proc is mounted, escape to the host's root filesystem and obtain a full root shell.
Published on merridvanpolat.medium.com
Haziran 2025’te yayınlanan CVE-2025–32462 zafiyeti, sudove chroot kombinasyonunun yanlış konfigüre edilmesi sonucu sistemde yetki yükseltmeye (privilege escalation) yol açabileceğini bir kez daha gözler önüne serdi.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a sudoers rule grants a non-root user passwordless permission to run chroot, and chroot alone does not drop root privileges or isolate the process from the host.
Impact
An attacker with that sudo permission could escape the jail and obtain a full root shell on the host system.
What the attacker needed
Sudoers allows passwordless chroot; attacker has a local account
The fix
The text says to avoid broad NOPASSWD sudoers rules for chroot and to use containers, namespaces, AppArmor/SELinux and seccomp instead; it does not say the issue was fixed.
How it was found
- The attacker has a sudoers entry allowing passwordless chroot.
- The attacker starts a shell inside the chroot jail with sudo.
- The attacker mounts /proc inside the jail.
- The attacker uses /proc/1/root to reach the host root filesystem and runs a shell there.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A chroot changes what a program sees as the top of the filesystem, like putting it in a fake folder that looks like the whole disk. If sudo lets a normal user start a chroot without a password, that program still runs with full administrator power. The text shows that the user can then use special files to step outside the fake folder and control the real machine.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.