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
20082026
-
▲ 1
Ask HN: Wuffs Examples for Text Files?story by dalke · 2023-05-22 · 0 comments
-
…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 -
Reminds me a bit of WUFFS ( https://github.com/google/wuffs ), although a bit more structured (or high level)
comment by ck45 · 2023-04-02 · in RecordFlux: Addressing binary protocol parser vulnerabilities -
…compiler to prove the addition wouldn’t overflow. Wuffs is specialized enough to do exactly that ( https://github.com/google/wuffs ).
comment by Sesse__ · 2022-12-07 · in Fast midpoint between two integers without overflow -
That's how WUFFS (Wrangling Untrusted File Formats Safely) works: https://github.com/google/wuffs#what-does-compile-time-check...
comment by nigeltao · 2022-11-30 · in How much does Rust's bounds checking cost? -
…Wuffs, a language focused on writing safe file format handlers (parsing, encoding, decoding) https://github.com/google/wuffs
comment by throwaway484 · 2022-11-26 · in Mangle, a programming language for deductive database programming -
…panics on this line In WUFFS foo[k] doesn't compile, variable k is the wrong type for indexing foo. https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... Now, WUFFS is not a general purpose programming language. You should not…
comment by tialaramex · 2022-11-06 · in Two years of fiddling with Rust -
There might be a few others. https://github.com/google/wuffs for example isn't general purpose or mainstream, but it's meant to solve practical problems, so I don't think I'd call it a research language. Opinions may vary.
comment by scottlamb · 2022-11-06 · in Two years of fiddling with Rust -
Here's another SIMD implementation, with commentary: https://github.com/google/wuffs/blob/main/std/adler32/common... Like the fpng implementation, it's SSE (128-bit registers), but the inner loop eats 32 bytes at a time, not 16. "Wuffs’…
comment by nigeltao · 2022-08-08 · in Computing Adler32 Checksums at 41 GB/s -
> Programing languages require precedence rules WUFFS doesn't have operator precedence. https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... As its designers explain: A bare a * b + c is an invalid expression. You must…
comment by tialaramex · 2022-08-07 · in Ivy – An interpreter for an APL-like language -
[WUFFS]( https://github.com/google/wuffs ) is made for stuff like this, and it has a library available as transpiled C code.
comment by SAI_Peregrinus · 2022-07-31 · in New Ghostscript PDF interpreter -
…should never happen as a result of processing a PDF. This is the purpose of languages like WUFFS: https://github.com/google/wuffs You can't write a WUFFS program to, for example, email anything to crooks@example.com even if you desperately…
comment by tialaramex · 2022-07-06 · in A fake job offer took down Axie Infinity -
This sort of stuff is where Iterate Loops are good: https://github.com/google/wuffs/blob/main/doc/note/iterate-l... WUFFS wants this because it demands all the checking at compile time (WUFFS code with a potential buffer overflow just…
comment by tialaramex · 2022-06-28 · in tolower() in bulk at speed -
…aimed at efficiently and safely parsing document structure. There is a PNG decoder [2]. 1. https://github.com/google/wuffs 2. https://news.ycombinator.com/item?id=26714831
comment by tgv · 2022-06-27 · in Pure: A static analysis file format checker -
…targeting these specific problems; that they'd consider Rust isn't just because "it's there". [1] https://github.com/google/wuffs
comment by riwsky · 2022-06-22 · in Experimenting with Rust in Chromium -
…unrolled loops nicely is a nice performance-not-safety feature of WUFFS called "Iterate loops": https://github.com/google/wuffs/blob/main/doc/note/iterate-l... Well, I say performance not safety, as always they want both, but you could…
comment by tialaramex · 2022-06-16 · in How fast can a 6502 transfer memory? -
For anyone curious: https://github.com/google/wuffs
comment by eru · 2022-06-13 · in Data Race Patterns in Go -
Wuffs[1] is an alternative that also supports generating the binary file. [1] https://github.com/google/wuffs
comment by janjones · 2022-04-03 · in Kaitai, binary format parsing web IDE -
Indeed, you should be Wrangling Untrusted File Formats Safely https://github.com/google/wuffs
comment by tialaramex · 2022-03-31 · in Lapsus$ and SolarWinds hackers both use the same old trick to bypass MFA -
I agree that it's similar but ultimately different problems. Copy/pasting from https://github.com/google/wuffs/blob/main/doc/related-work.m... gives: > Kaitai Struct is in a similar space, generating safe parsers for multiple target…
comment by nigeltao · 2022-03-18 · in Kaitai Struct: A new way to develop parsers for binary structures -
…and fast programming language made by Google specifically for decoding and encoding file formats https://github.com/google/wuffs Paired with C FFI available in most languages, this seems like the nicer solution. It's simpler than…
comment by kangalioo · 2022-03-17 · in Kaitai Struct: A new way to develop parsers for binary structures -
…even in principle express the programs that should not exist, that's exactly what WUFFS is for. https://github.com/google/wuffs This sort of bug can't happen in WUFFS because you can't express the idea "corrupt the heap memory" even if you…
comment by tialaramex · 2022-03-04 · in Heap memory corruption in GitHub's Markdown table parsing extension -
…I think, but am not sure, this is what the experimental parsing language 'wuffs' is about https://github.com/google/wuffs -- the language itself is aware of array lengths as a first-class citizen and can make decisions accordingly
comment by awinter-py · 2021-12-23 · in Three Minor Features in Go 1.18 -
https://github.com/google/wuffs
comment by snypher · 2021-12-16 · in A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution -
…deleted code is even safer than Rust. Apart from Rust, Wuffs is also a good candidate for codecs: https://github.com/google/wuffs/blob/main/doc/wuffs-the-lang... Too bad that Swift isn't that good for low-level codecs, so a Swift rewrite…
comment by pornel · 2021-12-15 · in A deep dive into an NSO zero-click iMessage exploit: Remote Code Execution -
If you must Wrangle Untrusted File Formats you should do so Safely: https://github.com/google/wuffs
comment by tialaramex · 2021-11-04 · in Gitlab servers are being exploited in DDoS attacks -
I thought this post was one long gag until I found WUFFS on GitHub: https://github.com/google/wuffs
comment by jdblair · 2021-08-29 · in Hell Is Other REPLs -
For a codec, WUFFS might be a better fit than Rust. https://github.com/google/wuffs In Rust, if I have two u8 variables and I add them together, Rust will try to figure out if it's sure at compile time that this is an overflow and if so…
comment by tialaramex · 2021-07-16 · in Is Rust Used Safely by Software Developers? -
▲ 2
Google Wuffsstory by tosh · 2021-06-30 · 1 comment
-
I don't agree. Consider WUFFS https://github.com/google/wuffs WUFFS will give you a C library that can turn PNG data into raw image data and is definitely correct. It's not exactly idiomatic C, you'd assume if a person wrote this code it's…
comment by tialaramex · 2021-06-27 · in CompCert – Formally-verified C compiler -
…It's a Google project, and I wouldn't be surprised if it eventually makes its way into Chrome. https://github.com/google/wuffs
comment by vinkelhake · 2021-06-13 · in A few thoughts on Fuchsia security -
…finds out the hard way. Now, on one hand you've got a simple image viewer built with WUFFS: https://github.com/google/wuffs which you are completely sure is safe for viewing the images, you could perhaps glance at a hundred images per…
comment by tialaramex · 2021-06-07 · in Gene sequencer malware injection via encoded DNA (2017) -
…you certainly can't be sure of that, none of the tools you use have such a cautious approach. † https://github.com/google/wuffs
comment by tialaramex · 2021-05-14 · in Using Rust Macros to exfiltrate secrets -
▲ 1
Wuffs (Programming Language) – Wrangling Untrusted File Formats Safelystory by peter_d_sherman · 2021-04-09 · 5 comments
-
…aspect for a reliable language, it wasn't immediately clear from the docs. Edit ah found it, https://github.com/google/wuffs/blob/main/doc/note/statuses....
comment by mkj · 2021-04-09 · in Wuffs the Language -
…JSON is a pretty simple spec and this obscures it (although to be fair it's also handling UTF-8). https://github.com/google/wuffs/blob/main/std/json/decode_js... Yes it prevents buffer overflows and integer overflow, but it can't prevent…
comment by chubot · 2021-04-08 · in Wuffs the Language -
> I'm curious if it is at all competitive with the Wuffs decoder You could try adapting https://github.com/google/wuffs/tree/main/script/bench-rust-... > https://github.com/bschwind/png-decoder Note that statements like: let…
comment by nigeltao · 2021-04-08 · in Wuffs’ PNG image decoder -
…portability and safe languages. (There may be some contorted way to have Rust emit C, too.) [0]: https://github.com/google/wuffs
comment by loeg · 2021-04-07 · in BleedingTooth: Linux Bluetooth Zero-Click Remote Code Execution -
▲ 187
Wuffs the Languagestory by bshanks · 2021-04-07 · 75 comments
-
…[1] is rarely used in C projects to parse untrusted data given that it can be translated to C. [1] https://github.com/google/wuffs
comment by citrin_ru · 2021-04-07 · in BleedingTooth: Linux Bluetooth Zero-Click Remote Code Execution -
The README on GitHub looks useful: https://github.com/google/wuffs
comment by chmaynard · 2021-04-07 · in Wuffs’ PNG image decoder -
▲ 3
Wuffs (Wrangling Untrusted File Formats Safely)story by pjmlp · 2021-04-07 · 0 comments
-
…like there isn't an encoder for PNG There isn't one yet, but I'd like to have one at some point. https://github.com/google/wuffs/blob/main/doc/roadmap.md
comment by nigeltao · 2021-04-07 · in Wuffs’ PNG image decoder -
…that. I'm not sure exactly what you're asking for, but see the Coroutines, Effects and I/O pages in https://github.com/google/wuffs/tree/main/doc/note
comment by nigeltao · 2021-04-07 · in Wuffs’ PNG image decoder -
Wuffs does not use a SMT solver. https://github.com/google/wuffs/blob/main/doc/note/assertion... explains.
comment by sanxiyn · 2021-04-07 · in Wuffs’ PNG image decoder -
…(like Rust) or add reference counting (like Rust `Arc`, C++ `shared_ptr`, Golang, Java, etc). [0] https://github.com/google/wuffs/blob/v0.3.0-beta.1/doc/note/...
comment by mleonhard · 2021-04-06 · in Wuffs’ PNG image decoder -
▲ 2
WUFFs Project and Language: Wrangling Untrusted File Formats Safelystory by andrewla · 2021-04-06 · 0 comments
-
Looks like there isn't an encoder for PNG: https://github.com/google/wuffs/tree/main/std/png Given the project goals, I guess most encoders don't make a lot of sense: For image encoding you basically provide an "x * y * bytes_per_pixel"…
comment by dividuum · 2021-04-06 · in Wuffs’ PNG image decoder -
…First time I've head of Wuffs. As someone that still uses C, this in particular sounds neat: (from https://github.com/google/wuffs#goals-and-non-goals ) """ Wuffs' goal is to produce software libraries that are as safe as Go or Rust,…
comment by dividuum · 2021-04-06 · in Wuffs’ PNG image decoder