|
|
Log in / Subscribe / Register

Ext4 encryption

Ext4 encryption

Posted Apr 13, 2015 23:58 UTC (Mon) by nix (subscriber, #2304)
In reply to: Ext4 encryption by skissane
Parent article: Ext4 encryption

http://austingroupbugs.net/view.php?id=251... oh my god that bug has so much concentrated stupid in it, it hurts. From dwheeler's perfectly reasonable proposal -- I can't see any sane programs being hurt by an optional, default-on flag that bars creation of files with linefeeds, esc, escape, backspace and the like in them -- we get to a mention (in Geoff Clare's comment 1732) of an old committee decision which has been catastrophically infected with second-system syndrome involving a new readdir() flag, a readdir() that fails when encountering such filenames (!!!) and oh dear oh dear I can't see this ever getting implemented. I'm frankly surprised Al Viro didn't turn up on the thread with some choice words for the people proposing such an overengineered disaster.

Even ignoring everything else, readdir() doesn't actually take flags, so what are they going to do? changing readdir()'s prototype is impossible and introducing a readdir2() with an extra flags argument is more or less useless because only those programs whose authors think about the problem of weird filenames would ever use it, but if people *did* think about that problem, weird filenames wouldn't cause trouble in the first place because everyone would handle them fine. If you had the flag default on unless readdir2() was used to turn it off, this would just turn filenames containing linefeeds into an attack vector on *everything*, not just on shell scripts, as others on the same bug pointed out. It's not like anything is really prepared for readdir() to fail, either -- people tend to assume readdir() failure means disk damage or some other catastrophic problem, so any directory with a filename in it inducing such a failure would be more or less entirely unusable. Bingo, instant DoS attack vector.


to post comments

Ext4 encryption

Posted Apr 14, 2015 0:38 UTC (Tue) by viro (subscriber, #7872) [Link] (1 responses)

Hadn't seen it, actually. What choice words, other than obvious "NOTABUG, WONTFIX", anyway? POSIX is only relevant to an extent it matches the reality. They can't order us to implement that kind of crap, they are extremely unlikely to be able to convince that it's a good idea (a quick scan leaves Bowman-style impression[1]), therefore it won't be implemented. Case closed. Any whinge along the lines of "but I've lobbied POSIX and now they say it's a bug" will be met with "it's their problem"...

[1] "My God, it's full of s..."

Ext4 encryption

Posted Apr 14, 2015 11:12 UTC (Tue) by nix (subscriber, #2304) [Link]

I think that's why its gone nowhere in five years or more. Several people pointed out that there was little chance anyone would willingly implement anything as baroque as that committee-driven scheme...


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds