Bug 200621 - getxattr() with zero value makes strace call free on invalid pointer.
Summary: getxattr() with zero value makes strace call free on invalid pointer.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: xattrs-tracker
TreeView+ depends on / blocked
 
Reported: 2006-07-29 04:35 UTC by James Antill
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 4.5.15-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 03:07:09 UTC
Type: ---
Embargoed:


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

Description James Antill 2006-07-29 04:35:55 UTC
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 15:24:04 UTC
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 11:41:32 UTC
Fixed upstream.

Comment 3 Roland McGrath 2007-01-11 11:15:14 UTC
these bugs are fixed upstream in the coming 4.5.15 release

Comment 4 Roland McGrath 2007-01-17 03:07:09 UTC
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.