GNU bug report logs - #40509
Use of fsetxattr() in cp tickles an EXT leak (possibly unnecessarily so)

Previous Next

Package: coreutils;

Reported by: Gregg Leventhal <gleventhal <at> janestreet.com>

Date: Wed, 8 Apr 2020 15:11:01 UTC

Severity: normal

Full log


Message #14 received at 40509 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Gregg Leventhal <gleventhal <at> janestreet.com>
Cc: 40509 <at> debbugs.gnu.org
Subject: Re: bug#40509: Use of fsetxattr() in cp tickles an EXT leak (possibly
 unnecessarily so)
Date: Wed, 15 Apr 2020 15:55:52 -0700
On 4/15/20 7:11 AM, Gregg Leventhal wrote:

> +    xattr_size = flistxattr(src_fd, list, size);
> +    if ( xattr_size || errno == ERANGE )

Surely this should be 'if (flistxattr (src_fd, NULL, 0) < 0 && errno == ERANGE)'.

> If you agree with this direction, I can continue, addressing other affected
> code paths (i.e --preserve=mode).

This sounds like a good thing to do. Before you spend a lot of time on it, 
though, would you be willing to assign copyright to your work product to the FSF 
so that we could install the patch? If so, I can send you email on how to fill 
out the paperwork; if not, we'd better arrange for someone else to write the fix.




This bug report was last modified 5 years and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.