Hacker GitHub

← All repos

google/wuffs

View on GitHub ↗ ★ 4,874 C

Wrangling Untrusted File Formats Safely

121 mentions on Hacker News by 76 people: 18 stories, 103 comments · first 2017-11-16 · latest 2026-10-29

Mentions per year 121 mentions · busiest year 2021 (28)
20082026
  1. …World program because (1) you can't do I/O in WUFFS and (2) the language doesn't have strings. https://github.com/google/wuffs
    comment by tialaramex · 2026-10-29 · in The case of the 9 bit AES key
  2. What happened to Wuffs? https://github.com/google/wuffs A programming language specifically geared for file format libraries, including safety and performance
    comment by kangalioo · 2026-10-04 · in Memory-Safe WebP Decoding
  3. Wuffs author here. We got a pull request ( https://github.com/google/wuffs/pull/168 ) in February to add lossy WebP support. Lossless WebP (which in some sense is an entirely different format, just reusing the WebP "brand") has had a Wuffs…
    comment by nigeltao · 2026-10-03 · in Memory-Safe WebP Decoding
  4. …would be another implementation worth comparing since it shares the same goals of safety and speed. https://github.com/google/wuffs/tree/main/std/webp
    comment by omoikane · 2026-10-03 · in Memory-Safe WebP Decoding
  5. …compromises. At some point we'll have to replace all parsers with something at least as safe as https://github.com/google/wuffs right? Otherwise ImageMagick and co. will just keep giving.
  6. …Language, so you probably want something like WUFFS [Wrangling Untrusted File Formats Safely]. https://github.com/google/wuffs
  7. TIL: wuffs - Wrangling Untrusted File Formats Safely https://github.com/google/wuffs
  8. …much stricter but more special purpose than Rust, WUFFS (Wrangling Untrusted File Formats Safely) https://github.com/google/wuffs WUFFS gives up generality - you can't write "Hello World" in WUFFS because it lacks both strings (for the…
    comment by tialaramex · 2026-07-26 · in Memory safety absolutists
  9. For the implemented formats, wuffs is safer and also often faster: https://github.com/google/wuffs
    comment by nulltype · 2026-06-13 · in Twenty One Zero-Days in FFmpeg
  10. Wuffs usually comes up in this context: https://github.com/google/wuffs
    comment by RossBencina · 2026-06-13 · in Twenty One Zero-Days in FFmpeg
  11. …your first. But also, WUFFS exists and it looks like the Google Chrome GIF decoder ships in it: https://github.com/google/wuffs
    comment by dwattttt · 2026-05-03 · in Dav2d
  12. …incorrect) impression that Google was going to start building all their decoders with that. [1] https://github.com/google/wuffs
    comment by 12_throw_away · 2025-11-24 · in Chrome Jpegxl Issue Reopened
  13. …Rust is a no-brainer and I'm happy to see Google pursuing their rustification of Android. [1]: https://github.com/google/wuffs
    comment by littlestymaar · 2025-11-13 · in Rust in Android: move fast and fix things
  14. …language is to pass the do-everything handle to every function. See also the WUFFS project: https://github.com/google/wuffs - where things like I/O simply do not exist in the language, and therefore, any WUFFS library is trustworthy.…
  15. See https://github.com/google/wuffs/blob/main/doc/related-work.m... > Kaitai Struct is in a similar space, generating safe parsers for multiple target programming languages from one declarative specification. Again, Wuffs differs in that…
  16. Is the main difference from https://github.com/google/wuffs being that Kaitai is declarative?
  17. No allocations, reminds me of WUFFS, which also comes with a GIF decoder: https://github.com/google/wuffs/blob/main/std/gif/decode_gif...
  18. You want a special purpose language. In your particular example of image loading, you want WUFFS. https://github.com/google/wuffs In WUFFS most programs are impossible. Their "Hello, world" doesn't print hello world because it literally…
  19. And - https://github.com/google/wuffs/blob/main/doc/std/image-deco... with a webp implementation .
  20. https://github.com/google/wuffs <-- DSL created explicitly for wrangling fileformats safely
  21. On that note I've been meaning to explore Wuffs for this problem. https://github.com/google/wuffs
    comment by krapht · 2025-03-13 · in Fast-PNG: PNG image decoder and encoder
  22. …of hyper-specific need (codecs) is probably better served by a specialist language, like Whuffs ( https://github.com/google/wuffs ). You don't need, or want, the level of expressiveness that comes with something like Rust, but on the other…
    comment by hlieberman · 2025-03-08 · in Rust inadequate for text compression codecs?
  23. …also feel like some things could be done in Ada or one of the more strict functional languages. 0: https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang...
    comment by actionfromafar · 2025-01-23 · in RealtimeSanitizer for Rust
  24. …written that way. That said, if you want another language “resembling C”, there is always WUFFS: https://github.com/google/wuffs The output of the WUFFS compiler certainly resembles C because it is C.
  25. Reminder that https://github.com/google/wuffs exists too.
  26. Again, there are safe ways of doing this. For example, Wuffs exists: https://github.com/google/wuffs At the very least, big money security software companies should be parsing untrusted content with some kind of rigorouly safe approach,…
  27. …something like last year's buffer overflow in libwebp (although that's overkill when a project like https://github.com/google/wuffs exists), but I'm unclear on how it gets you a better JIT.
  28. I was confused about how one can write an emulator in the wuffs language. :-D https://github.com/google/wuffs/blob/main/doc/note/hermetici...
    comment by actionfromafar · 2024-05-22 · in Psion 5mx Emulator
  29. …something around 2x faster than LibPNG in my tests (depending on the PNG file), see timings here: https://github.com/google/wuffs/issues/13#issuecomment-17325... So generally Wuffs is great and you should use it to decode your PNGs. There…
  30. …isn't it. What programming language should we use for Wrangling Untrusted File Formats Safely ? https://github.com/google/wuffs
  31. …code tarball correctly (producing the same output as /usr/bin/xz). $ git clone --quiet --depth=1 https://github.com/google/wuffs.git $ gcc -O3 wuffs/example/mzcat/mzcat.c -o my-mzcat $ ./my-mzcat < linux-6.8.2.tar.xz | sha256sum…
    comment by nigeltao · 2024-04-04 · in Jpegli: A new JPEG coding library
  32. It appears that XZ actually is in WUFFS! https://github.com/google/wuffs/tree/main/std/xz
    comment by haneefmubarak · 2024-04-03 · in Jpegli: A new JPEG coding library
  33. I wonder if Google will make a JPEG library with https://github.com/google/wuffs at some point.
    comment by kaladin-jasnah · 2024-04-03 · in Jpegli: A new JPEG coding library
  34. Why is it written in C++, when Google made Wuffs[1] for this exact purpose? [1]: https://github.com/google/wuffs
    comment by littlestymaar · 2024-04-03 · in Jpegli: A new JPEG coding library
  35. It takes some effort to implement, but Google has WUFFS for almost exactly this purpose: https://github.com/google/wuffs
  36. It could author its format parsers in https://github.com/google/wuffs , and make them BSD-like open source to maximize adoption. An even bigger change: It could allow users to choose their iMessage client freely. Why not open up the…
  37. …safely, and the result drops in to a C codebase to make the compat/migration story easy. [0] https://github.com/google/wuffs
  38. There are already huffman-decoding and some parts of webp algorithms in https://github.com/google/wuffs (language that finds missing bounds checks during compilations). In contrary, according to readme, this language allows to write more…
  39. One example for a safer language developed at Google: https://github.com/google/wuffs
  40. …what I would expect the webp parser to be written in, over Rust or a garbage collected language. https://github.com/google/wuffs
  41. …be in bounds at runtime) it just rejects programs where it can't see why the indexes are in-bounds. https://github.com/google/wuffs You can explicitly write the same checks and meet this requirement, but chances are since you believe…
    comment by tialaramex · 2023-09-22 · in The WebP 0day
  42. …vulnerabilities If we are talking about binary formats, now there are systematic solutions like https://github.com/google/wuffs that protect against vulnerabilities. But SQLite is not just a format - it's an evolving ecosystem with…
  43. …to be glued with unverified non-Wuffs code [2]. This approach only works with simpler formats. [1] https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... [2] https://github.com/google/wuffs/blob/main/doc/note/memory-sa...
    comment by lifthrasiir · 2023-09-12 · in Chrome: Heap buffer overflow in WebP
  44. …is therefore trivially safe against things like memory leaks, use-after-frees and double-frees). https://github.com/google/wuffs
  45. There are efforts to do that, notably https://github.com/google/wuffs RLBox is another interesting option that lets you sandbox C/C++ code. I think the main reason is that security is one of those things that people don't care about until…
  46. …it makes no sense for people to hand roll this sort of software in C when they should use WUFFS. https://github.com/google/wuffs
  47. …at the very top of the "More details are at [link]" page in the grand-parent comment. $ git clone https://github.com/google/wuffs.git $ g++ -O3 -Wall wuffs/example/jsonptr/jsonptr.cc -o my-jsonptr
    comment by nigeltao · 2023-05-26 · in JJ: JSON Stream Editor
  48. …a little language that had super-good performance, C might be a good choice. (See also, [Wuffs]( https://github.com/google/wuffs ), by Nigel Tao et al at Google). A suggestion, if you do target C -- don't work too hard to find isomorphisms…
    comment by drchase · 2023-05-07 · in FaaS in Go with WASM, WASI and Rust
  49. Reminds me a bit of WUFFS ( https://github.com/google/wuffs ), although a bit more structured (or high level)
  50. That sounds a bit like what WUFFS is doing WUFFS: https://github.com/google/wuffs
    comment by ck45 · 2022-12-22 · in Checked C