5 ms·
Wouldn't it be a good idea to remove pack support from gzip if it obviously doesn't get enough eyeballs to detect bugs in a timely manner? Poorly tested obscure
by adrianN 9y ago
Wouldn't it be a good idea to remove pack support from gzip if it obviously doesn't get enough eyeballs to detect bugs in a timely manner? Poorly tested obscure format support is a goldmine for hackers looking for exploitable code.
- gumby 9y agoIt's valuable to keep legacy decompression around for opening up old files, lest the data be lost forever.
- cat199 9y agoYep. I once fired up a TOPS-10 VM on SIM-H to fire up an old system for historical research purposes: https://en.wikipedia.org/wiki/MATHLAB https://en.wikipedia.org/wiki/MATHLAB ditto 4.2BSD and so on, various .tar.Z archives of yore, etc. Quite alot of good code that already does what you are wanting to do was written decades before you realized you wanted to do it.
- untog 9y agoRemoving it from the browser wouldn't remove it from the world. You could always download the compressed file then use a CLI tool, or something.
- awirth 9y agoA nice middle ground would be to change to have this unexpected code path require explicit invocation via a command line flag or enablement through an env variable. This would reduce the attack surface for the vast majority of users and still retain support (albeit not entirely backwards compatible with scripts) for folks that want this. > Poorly tested obscure format support is a goldmine for hackers looking for exploitable code. IMO the issue is when these code paths are automatically invoked. This is how you get gstreamer running 6502 opcodes for a codec no one has ever heard of when you download a file from the internet.
- vanderZwan 9y ago> This is how you get gstreamer running 6502 opcodes for a codec no one has ever heard of when you download a file from the internet. Ok, I'll bite: context?
- tekromancr 9y agoiirc, it has to do with gstreamer's support for chiptunes in their native format. There is basicly a nes emulator built in.
- lmm 9y agohttps://scarybeastsecurity.blogspot.co.uk/2016/11/0day-exploit-compromising-linux-desktop.html https://scarybeastsecurity.blogspot.co.uk/2016/11/0day-explo...
- deleted 9y ago[deleted]
- developer2 9y agoI don't see how a command line flag or environment variable helps to reduce the attack surface. If an exploit is found, any attacker can add the required flag or environment variable anyway.
- adrianN 9y ago
- thinkMOAR 9y agoThis could be achieved of archiving the source tree of the compression software/version used to create the backups, or at least a version note. Nowadays with version control every can checkout and revert to older versions when they need to. I'm not convinced it's the compression software author responsibility.
- sametmax 9y agoWithout a running software, not check is made for the build. And without a checked build, one day, you will realize your machine can build this anymore and you would need to understand the algo, port it and compile it yourself to open a file.
- TheCondor 9y agoWhat of having a pure ANSI C implementation of pack and unpack available? I, too, am concerned with future data loss due to codec extinction. A solution seems like it’d take the shape of an archive of the codecs in a simple, pure C subset with an actively maintained compiler. Unused code should be refactored out of mainstream tools
- lmm 9y agoThere's no test suite for "pure ANSI C". Even experts tend to write code that relies on undefined behaviour. I'd sooner trust e.g. Java bytecode to remain executable in the future.
- microcolonel 9y agoThe C compatibility test comes when you build your kernel, your toolchain, your browsers, your shells, your desktop applications, and run their test suites after each build. ;- ) "ANSI C" is a bit of a misnomer, since a) there have been updates to the ANSI standard which are not considered "ANSI C", and b) all of the updates are sworn to be backward compatible.
- lmm 9y ago> The C compatibility test comes when you build your kernel, your toolchain, your browsers, your shells, your desktop applications, and run their test suites after each build. ;- ) But if we're talking about obscure applications being preserved for posterity, they're not going to get built. Really I was talking about the other direction though: a way to confirm that a given program is written using only ANSI C. There's no testsuite for that, all you can do is test with the compilers that exist - and then sometimes your program suddenly stops working in the next version of the compiler.
- microcolonel 9y ago> But if we're talking about obscure applications being preserved for posterity, they're not going to get built. Well, they don't really need to be, that's the point. > Really I was talking about the other direction though: a way to confirm that a given program is written using only ANSI C. There's no testsuite for that, all you can do is test with the compilers that exist - and then sometimes your program suddenly stops working in the next version of the compiler. See --std=c89 or -ansi flags on GCC or Clang. One other way to prevent other sources of rot is to avoid UB that is frequently subject to change. Most UB is defined, at worst, by the constraints of real ISAs (i.e. the behaviour of idiv when dividing INT_MIN by -1 is an exception on x86, but the ARMv7 equivalent simply produces a number), and most UB-altering characteristics are standard across popular ISAs, and new (general purpose) ISAs tend to go with the status quo when in doubt. And if all else fails, you can still run your code in an ISA simulator, and compile it with an old compiler, to figure out exactly what it meant in the past.
- mafsedan 9y agoNo. Format rot isn't a good thing.