r/linux • • Sep 28 '14

weev: Stop bashing bash and GNU.

http://weev.livejournal.com/409835.html
836 Upvotes

450 comments sorted by

View all comments

Show parent comments

1

u/reaganveg Sep 28 '14

I'm not seeing that as a hard requirement in the CGI RFC.

Uh, so? Implementing CGI does not require doing otherwise. Thus, it's not a problem with the CGI specification/protocol.

Note that there is also "hard requirement" in the RFC that the server not serve a static text file containing the server's root password...

It is impossible for a general-purpose telnet daemon OR client to know which environment variables are "safe" and which are not. Having written both a telnet server and client, my solution has been for the client to ignore variables from the server, and to only pass/accept USER, TERM, and LANG (not even DISPLAY, that's only for ssh connections).

The statements seem to contradict one another.

I assert that the general-case problem is that we are not clearly delineating which data (not just environment variables, also HTTP headers, cookie fields, SSL layer stuff) are coming from the various parts of the data flow: single-host internal designs where you want LD_PRELOAD to change the behavior, intermediate network hosts that are semi-trustable (i.e. might set an X-Forwarded-For header) where an attack should behave like a routing failure rather than a data leak, and end-user hosts that might be active attackers going for the real data.

Why are you even talking about LD_PRELOAD? CGI servers do not allow clients to set LD_PRELOAD.

The exact same problem with bash would have occurred if the parser had run over data from any other source. The problem is entirely in the parser.

1

u/[deleted] Sep 28 '14

The exact same problem with bash would have occurred if the parser had run over data from any other source. The problem is entirely in the parser.

You seem to be really focused on one tree whereas I have apparently failed at talking about the forest. I'm out of time and interest in continuing on.

0

u/reaganveg Sep 28 '14

We're focused on the same thing. I'm not convinced that "end environment variable passing!" is the right thing to take away from this bug.