Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 30 Sep 2014 08:31:18 -0700
From: Ed Prevost <>
Subject: Re: Healing the bash fork

On 9/30/2014 8:08 AM, Tavis Ormandy wrote:
> On Tue, Sep 30, 2014 at 8:02 AM, Mark R Bannister
> <> wrote:
>>>> Florian's prefix/suffix patch is not going to protect against the setuid/setgid exploit that I reported to this list last week.> >
>>>> I discuss the setuid/setgid vulnerability at the following site, including demonstrating how Florian's prefix/suffix patch provides no protection:
>>> You do realize that your setuid program is patently unsafe, right? Say:
>>> $ echo -e '#!/bin/sh\necho pwn3d' >date;chmod 755 date;PATH=.:$PWD
>>> ../setuid_program
>>> pwn3d
>> Glad my over-simplified example has raised a few smirks.  Now for a slightly less simplified version:
>> putenv("PATH=/bin:/usr/bin");
>> setreuid(0, 0);
>> system("date");
> Keep going, eventually you're going to have to stop blacklisting
> variables and use execve ;-)
> $ env SHELLOPTS=xtrace PS4='$(id)' ./foo
>> But the point is I've tried to boil down a relatively complex program by studying endless strace outputs to attempt to demonstrate a real world exploit.  It wasn't actually "date" that was being called, but you get the point.
> Yes, but it's not safe to use system() or popen() from setuid
> programs, no bash patch is going to change that. In fact, bash already
> does more than most other shells by dropping privileges if euid !=
> uid, i.e. "privileged mode".
>> In the past, i.e. pre-Shellshock, the above code may have raised eyebrows, but as PATH was sanitised it would have passed numerous security audits.
> No, it's not safe to use system() or popen() in this context.
> Tavis.
I believe the term following this is 'Mansplained'

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.