Your message dated Wed, 27 Jan 2021 12:05:29 +0000
with message-id <[email protected]>
and subject line Re: Bug#962912: glib2.0: g_file_copy_attributes() chokes on 
binary xattr values
has caused the Debian Bug report #962912,
regarding glib2.0: g_file_copy_attributes() chokes on binary xattr values
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
962912: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962912
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libglib2.0-0
Version: 2.58.3-2+deb10u2
Severity: important

g_file_copy_attributes(), when invoked with G_FILE_COPY_ALL_METADATA on
files in NFS, is prone to truncating the value of extended attribute
system.nfs4_acl. Here is an excerpt from strace output, showing the
getxattr() and setxattr() calls:

getxattr("/home/xxx/a", "system.nfs4_acl", 0x7ffef8b54a20, 63) = -1 ERANGE 
(Numerical result out of range)
getxattr("/home/xxx/a", "system.nfs4_acl", NULL, 0) = 80
getxattr("/home/xxx/a", "system.nfs4_acl", 
"\0\0\0\3\0\0\0\0\0\0\0\0\0\26\1\247\0\0\0\6OWNER@\0\0\0\0\0", 80) = 80
setxattr("/home/xxx/b", "system.nfs4_acl", "", 0, 0) = -1 EIO (Input/output 
error)

Note how the attribute value was truncated from 80 bytes to 0. I believe this
is because the value starts with a 0 byte. gio/glocalfileinfo.c:escape_xattr()
does not make use of the len argument when computing escaped_val, but instead
invokes strlen() which is unsuitable for binary strings. A look at the latest
upstream version, 2.64.3, suggests the problem is still there.

This impacts such operations as "Save As" in evince.

Due to an unrelated bug I recommend running a recent kernel (e.g., 5.5 rather
than 4.19) when attempting to reproduce this problem.

--- End Message ---
--- Begin Message ---
Version: 2.66.0-1

On Wed, 08 Jul 2020 at 13:34:00 +0100, Philip Withnall wrote:
> On Tue, 2020-06-16 at 02:44 +0200, Sergio Gelato wrote:
> > Here is a patch that works for me.
> 
> Upstreamed as https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1568

This was included in upstream release 2.66.0 or earlier, so this is fixed
in testing/unstable.

    smcv

--- End Message ---

Reply via email to