Re:3rd Shellshock Vulnerability Found
by rootbear on Friday September 26, 2014 @12:58PM
(#8373569)
If this is how passing functions is supposed to work in bash, then why do I get different results, depending on which system I'm on? I've been madly patching my systems since yesterday and on a RHEL 6.5 system I get a different result than from an Ubuntu 12.04 system:
Is this a basic difference in the feature sets of Bash 4.1 and Bash 4.2? Like several posters, I was unaware of this feature and have certainly never used it. Perhaps it should be off by defaults? How big of a mess would that make? I would also like to see more distributions use something other than bash as /bin/sh, but that's another discussion, I guess.
[ Parent
| on HN ]
You need to use export -f now, the specifics of how functions are exported have changed in the redhat patch, ls='() { ... is not sufficient anymore. Nothing has broken unless you had something calling bash that was not bash and you used this internal to bash implementation hack-like knowledge that 'foo=() {' is how those pre this redhat patch versions of bash did it.
Thank you! I haven't had time to read the documentation for Red Hat's change.
As I mentioned in my other comment[1], I'm not 100% sure, but I think RedHat's patches for the 2nd vulnerability also cover this one.
But which behavior is correct? On Ubuntu, ls is redefined, but isn't that what a shell function is supposed to do? If Red Hat "fixed" this, then haven't they disabled a feature? Sorry, not trying to be obtuse...
Good question, I don't know…but looks like mzs's comment answers us both. ;-)
Re:3rd Shellshock Vulnerability Found
by daveloyall on Friday September 26, 2014 @01:59PM
(#8373874)
s/vulnerable/working/
Fixed that for you. :)