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
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.