On Sat, Apr 17, 2021 at 9:08 AM Linus Torvalds wrote: > > Side note: I'm, looking at the readdir cases that I wrote, and I have > to just say that is broken too. So "stones and glass houses" etc, and > I'll have to fix that too. In particular, the very very old OLD_READDIR interface that only fills in one dirent at a time didn't call verify_dirent_name(). Same for the compat version. This requires a corrupt filesystem to be an issue (and even then, most/all would have the length of a directory entry in an 'unsigned char', so even corrupt filesystems would generally never have a negative name length). So I don't think it's an issue in _practice_, but at the same time it is very much an example of the same issue that put_cmsg() has in net-next: unsafe user copies should be fully guarded and not have some "but this would never happen because callers would never do anything bad". Al - fairly trivial patch applied, comments? Linus