[systemd-devel] [PATCH 00/11] *** SUBJECT HERE ***

Florian Weimer fweimer at redhat.com
Fri Dec 20 12:00:47 PST 2013


On 12/20/2013 08:50 PM, Colin Walters wrote:
> On Thu, 2013-12-19 at 14:20 +0100, Florian Weimer wrote:
>
>> readdir_r is rather broken on Linux because there are some directories
>> it cannot read.
>
> Citation?  Are you talking about
> http://womble.decadent.org.uk/readdir_r-advisory.html
>
> ?

Partly, yes.  Current glibc documentation has this to say:

<https://sourceware.org/git/?p=glibc.git;a=blob;f=manual/filesys.texi;h=1cac45393d554a7a6a83c184262e2ce0be7c8885;hb=HEAD#l495>

(Disclaimer: I helped to write these paragraphs.  Also see the comments 
about NAME_MAX in conf.texi.)

Previous glibc versions truncated the buffer so that it wasn't 
necessarily NUL-terminated, or had a buffer overflow (on certain 
non-mainstream architectures).  readdir_r also makes an necessary copy 
of the dirent struct.

-- 
Florian Weimer / Red Hat Product Security Team


More information about the systemd-devel mailing list