bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#276352: du: segfaults if you move folder(s) while it is counting


From: Jim Meyering
Subject: Re: Bug#276352: du: segfaults if you move folder(s) while it is counting
Date: Thu, 14 Oct 2004 21:55:32 +0200

Jim Meyering <address@hidden> wrote:
> 2004-10-13  Jim Meyering  <address@hidden>
>
>       * fts.c (fts_read): When about to fail (by returning NULL) due
>       to a failed fchdir or failed fts_safe_changedir call, set
>       `sp->fts_cur = p'.  Do this by removing the explicit `return NULL;'
>       statements and setting p->fts_errno so execution falls through
>       to the common-case code below.  Otherwise, after such a failure,
>       calling fts_close would attempt to free an already-freed buffer.
>       Reported by Luis Lopez Lopez in http://bugs.debian.org/276352.

Regarding the above change,
note that chmod, chown, and chgrp are also susceptible,
since they all use fts_read and fts_close in the same way.
FWIW, I confirmed that I could make an unpatched chmod
attempt a double-free, but it didn't segfault.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]