{"id":3304,"date":"2014-09-25T09:43:14","date_gmt":"2014-09-25T07:43:14","guid":{"rendered":"http:\/\/glandium.org\/blog\/?p=3304"},"modified":"2019-09-03T15:26:15","modified_gmt":"2019-09-03T06:26:15","slug":"so-hum-bash","status":"publish","type":"post","link":"https:\/\/glandium.org\/blog\/?p=3304","title":{"rendered":"So, hum, bash&#8230;"},"content":{"rendered":"<p>So, I guess you heard about the latest <a href=\"http:\/\/arstechnica.com\/security\/2014\/09\/bug-in-bash-shell-creates-big-security-hole-on-anything-with-nix-in-it\/\">bash hole<\/a>.<\/p>\n<p>What baffles me is that the following still is allowed:<\/p>\n<blockquote><p><code>env echo='() { xterm;}' bash -c \"echo this is a test\"<\/code><\/p><\/blockquote>\n<p>Interesting replacements for \"<code>echo<\/code>\", \"<code>xterm<\/code>\" and \"<code>echo this is a test<\/code>\" are left as an exercise to the reader.<\/p>\n<p><b>Update:<\/b> Another thing that bugs me: Why is this feature even enabled in posix mode? (the mode you get from <code>bash --posix<\/code>, or, more importantly, when running bash as sh) After all, <code>export -f<\/code> is a bashism.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I guess you heard about the latest bash hole. What baffles me is that the following still is allowed: env echo='() { xterm;}&#8217; bash -c &#8220;echo this is a test&#8221; Interesting replacements for &#8220;echo&#8221;, &#8220;xterm&#8221; and &#8220;echo this is a test&#8221; are left as an exercise to the reader. Update: Another thing that bugs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,25],"tags":[23],"class_list":["post-3304","post","type-post","status-publish","format-standard","hentry","category-pdo","category-planet-mozilla","tag-en"],"_links":{"self":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3304"}],"version-history":[{"count":4,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3304\/revisions"}],"predecessor-version":[{"id":3309,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3304\/revisions\/3309"}],"wp:attachment":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}