4 ms·
Another round of image bugs: PNG and JPEG XR
- foliveira 12y agoIt seems that Safari 8.0.3 on OS 10.10.2 is also affected by the PNG bug. Although it has a variable number of variants each time the page is open/refreshed (don't have access to a vulnerable IE to test if it has the same behaviour)
- acdha 12y agoIt might be the case that the variants aren't exploitable – Safari uses CoreImage and that framework tends to bend over backwards to support malformed images so I wouldn't be surprised to see it render differently for each slightly different test image even if none of them are exploitable.
- 0x0 12y agoBut isn't the idea here that all the "variants" are actually the same exact .png byte stream? So any differences are the result of leaking memory...?
- acdha 12y agoYou're right – the random call is just a dodge around caching. It could be leaked memory or possibly something like an address dependency but I'd hope that he submitted it to Apple along with the other browsers he's been testing.
- 0x0 12y agoIt's also acting up in iOS on mobile safari. And, even more interestingly, if you long-tap a few of the images and save them to the photo stream, you'll see them change "live" in lots of applications like the photo browser, photo editors, pasting in an iMessage, etc.
- lmm 12y agoNow that we have an OCaml SSL implementation, has anyone put together a roadmap for building up to a complete browser in OCaml? It would be the work of a decade or more to rewrite image parsing, HTML rendering and all the rest of it, but I honestly think it's the only way we're ever going to get decent security.
- robin_reala 12y agoThe other way is Rust :) https://github.com/servo/servo https://github.com/servo/servo Interestingly Mozilla are looking at parts of Gecko that could be rewritten in Rust as an early win (instead of rewriting the entire thing) and image decoding comes up pretty often as a candidate.
- thegeomaster 12y agoI'm wondering about Mozilla's plans with Servo. Granted, it's a layout engine and the majority of these bugs creep up in low-level data processing (such as in this example) but it's a necessary step towards writing a browser using "safe" technology. Now we only depend on the security of compilers and VMs for these languages :)
- sp332 12y agoServo is an experimental platform and is not intended for production. Hopefully people will learn from it when making future projects though.
- pjmlp 12y agoYep, another example of C features. I am really looking forward that the likes of D, Go, Rust, .NET Native, Ada, ParaSail, Chapel, Java (past v10) and many others help reduce even more the need for C to the same level as Assembly use nowadays.
- TazeTSchnitzel 12y agoI think I need to write a "C Programming Language Considered Harmful" essay. In this era, using a language which allows buffer overflows, heap corruption, use-after-free, integer overflow, and eliminates "undefined" but security-critical code, is utterly irresponsible for anything where security matters - and that is virtually anything, given the complexity and interactions in modern systems. All code should have mandatory, compiler-enforced integer overflow and bounds checks at the very least.
- ygra 12y agoWe should have settled on Pascal long ago :-)
- golergka 12y agoI feel like that too — but then I read something like this http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918 http://thread.gmane.org/gmane.comp.version-control.git/57643... and I begin to think that may be I just feel that because I'm a OOP, garbage-collected brought-up weakling who doesn't comprehend the wisdom of the C wizards.
- TazeTSchnitzel 12y ago...huh? This has nothing to do with C's imperative, procedural, low-level programming style. It has everything to do with safety.
- pjc50 12y agoNo, that's Linus choosing to offend people. It's not that he's entirely wrong about portability and stability of modern C++ in 2007, and it certainly introduces a whole new wave of ways to shoot yourself in the foot, but some of the conveniences are genuine improvements.
- pjmlp 12y agoThis was already clear to many of us Modula-2/Turbo Pascal developers back in the mid-90's, but then C won thanks to UNIX adoption. - Array implicit decay into pointers instead of requiring an explicit "address of" operator - No bounds checking - Implicit conversion between enumerations and numeric types - Implicit conversions between numeric types - Null terminated strings Every time I had code in straight C, I made it look like Pascal by validating all the parameters, compiling with all warnings enabled, warnings as errors, using ADTs with no field access to structs. A static analyzer is also compulsory. The amount of money caused by bug fixing in developer time, creation of C memory corruption detection tools and paying for them is just endless.
- shubhamjain 12y agoSeriously, how does one go about discovering obscure exploits like these?
- medmunds 12y agoWell, fuzzing, apparently: > Similarly to the previously discussed bugs ... these two were found with afl-fuzz. http://lcamtuf.coredump.cx/afl/ http://lcamtuf.coredump.cx/afl/
- robin_reala 12y agoYou write a fuzzer: http://lcamtuf.coredump.cx/afl/ http://lcamtuf.coredump.cx/afl/