FreeBSD bug gives untrusted root access
'Unbelievably simple' exploit
A security bug in the latest version of FreeBSD can be exploited to grant unprivileged users complete control over the operating system, a German researcher said Monday.
The flaw is present in FreeBSD 8.0 and is known to affect versions 7.1 and 7.2 of the open-source OS, Nikolaos Rangos told The Register. He said it was "unbelievably simple" to exploit. Shortly after he disclosed the flaw on the Full Disclosure mailing list, other researchers said they were able to confirm the bug.
FreeBSD Security Officer Colin Percival said the Full Disclosure post was the first his team had heard of the reported vulnerability. The team is currently investigating.
The bug resides in FreeBSD's run-time link editor. A binary run by an unprivileged user can be executed with administrative privileges in a restricted environment, Rangos said. That allows the user to obtain root access to the system. All that's required to run the exploit code, which Rangos included in his post, is a command shell.
To exploit the bug, hackers would need local access to the vulnerable machine. To use the attack code remotely, it's conceivable it could be used in concert with another vulnerability, such as one residing in a web application running on the box.
Rangos speculated a fix would be coming shortly.
"The bug is in the most recent versions of FreeBSD and normally local root vulnerabilities are quickly patched by the FreeBSD maintainers," he said. ®
FreeBSD's Percival has issued an advisory here. It includes a patch that he says may or may not be final. He writes: "It is even possible (although highly doubtful) that this patch does not fully fix the issue or introduces new issues -- in short, use at your own risk (even more than usual)."
Hey it's not that often that a penguin lover gets to tease Beastie on a security issue; I'll go get my coat in due time, just let me savor my few CPU cycles of glory...
Making it widely known is often the only way to get it fixed, and get people to patch their systems, otherwise you get the MS-with-IE approach of leaving remote root holes in the wild for a year.
We do. The responsible and established method of reporting vulnerabilities that potentially affect a large installed base of machines is to report via the relevant project's security contact. In this case, all the information you could possibly need to report in a responsible manner is here:
The FreeBSD secteam always credits researchers who report responsibly with finds, so I see no reason why the researcher in this case chose to make public full exploit code without giving the project a chance to mitigate this issue first. Ego or mischief? You decide.
"Har har, you're not a secure as you thought you were" isn't very constructive, especially when the FreeBSD community is much more amenable to the idea that bugs exist, nobody is perfect and the best direction to expend effort is in finding and fixing them.