[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: [Bug 984910] rm fails to detect errors in readdir(3)
From: |
Bernhard Voelker |
Subject: |
Fwd: [Bug 984910] rm fails to detect errors in readdir(3) |
Date: |
Tue, 21 Jun 2016 20:58:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
forwarding to gnulib.
Have a nice day,
Berny
-------- Forwarded Message --------
Subject: [Bug 984910] rm fails to detect errors in readdir(3)
Date: Wed, 15 Jun 2016 19:26:24 +0000
From: address@hidden
Andreas Stieger changed bug 984910
<http://bugzilla.opensuse.org/show_bug.cgi?id=984910>
--------------------------------------
openSUSE bug report by: Peter Benie <address@hidden>
rm, and anything else in coreutils using the fts functions, fails to
detect errors in readdir(3). Thankfully such errors are rare, but an
example of where they can occur is where a NFS server has a poor readdir
cookie implementation.
The very latest upsteam coreutils uses the fts functions that are built
into libc. In OpenSuSE 13.2 it uses its own copy of fts.
The error is in lib/fts.c:fts_read(), which calls readdir() without
correctly checking the error return. readdir returns NULL on end-of-directory
or on error; fts_read assumes that NULL always means end-of-directory.
Patch attached.
Peter
coreutils-readdir.diff
Description: Text Data
- Fwd: [Bug 984910] rm fails to detect errors in readdir(3),
Bernhard Voelker <=
Re: [Bug 984910] rm fails to detect errors in readdir(3), Pádraig Brady, 2016/06/22