Bug 200621 - getxattr() with zero value makes strace call free on invalid pointer.
getxattr() with zero value makes strace call free on invalid pointer.
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks: xattrs-tracker
  Show dependency treegraph
 
Reported: 2006-07-29 00:35 EDT by James Antill
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.5.15-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-16 22:07:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
strace-4.5.14-alt-print_xattr_val.patch (517 bytes, patch)
2006-09-01 11:24 EDT, Dmitry V. Levin
no flags Details | Diff

  None (edit)
Description James Antill 2006-07-29 00:35:55 EDT
Description:
 getxattr()/lgetxattr() and presumably fgetxattr() make strace call free() on an
invalid pointer when they return 0 byte values. Eg.

% attr -s mime_type -V '' foo
Attribute "mime_type" set to a 0 byte value for foo:

% attr -g mime_type foo
Attribute "mime_type" had a 0 byte value for foo:

% strace attr -g mime_type foo
[...]
lgetxattr("j/src/and-httpd", "user.mime_type"*** glibc detected *** strace:
free(): invalid pointer: 0x082fa530 ***


How reproducible:
 Always
Comment 1 Dmitry V. Levin 2006-09-01 11:24:04 EDT
Created attachment 135384 [details]
strace-4.5.14-alt-print_xattr_val.patch

Proposed fix for the memory corruption bug.
Comment 2 Dmitry V. Levin 2006-11-26 06:41:32 EST
Fixed upstream.
Comment 3 Roland McGrath 2007-01-11 06:15:14 EST
these bugs are fixed upstream in the coming 4.5.15 release
Comment 4 Roland McGrath 2007-01-16 22:07:09 EST
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.

Note You need to log in before you can comment on or make changes to this bug.