Bug 189106 - segmentation fault in attr
segmentation fault in attr
Product: Fedora
Classification: Fedora
Component: attr (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Zdenek Prikryl
: 200623 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-04-16 05:44 EDT by Russell Strong
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-25 08:13:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Russell Strong 2006-04-16 05:44:35 EDT
Description of problem:

[russell@tecra 2006-04-10--21.32.38]$ gdb attr
GNU gdb Red Hat Linux (
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) r -l 00002.jpg
Starting program: /usr/bin/attr -l 00002.jpg
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xbdc000

Program received signal SIGSEGV, Segmentation fault.
0x00c64217 in strncmp () from /lib/libc.so.6
(gdb) bt
#0  0x00c64217 in strncmp () from /lib/libc.so.6
#1  0x0013cdf6 in api_unconvert (name=0xbfd93088 "selinux", linuxname=0xbfd96000
<Address 0xbfd96000 out of bounds>,
    irixflags=1) at libattr.c:72
#2  0x0013db9a in attr_list (path=0xbfd949b7 "00002.jpg", buffer=0x92b58e8 "\t",
buffersize=61440, flags=Variable "flags" is not available.
) at libattr.c:293
#3  0x08048c2f in main (argc=Cannot access memory at address 0x6573002e
) at attr.c:225
#4  0x00c0f7e4 in __libc_start_main () from /lib/libc.so.6
#5  0x08048871 in _start ()

Version-Release number of selected component (if applicable):


How reproducible:

assign the following attributes, either one at a time or via setfattr --restore

# file: test
user.Beagle.Filter="003 Beagle.Filters.FilterJpeg"
user.Beagle.Fingerprint="02 0b2Nrmg38kuEi8NTLBSbSw"
user.hello="hello world\012"
user.test="{'shore_rssi':0.0, 'shore_rssi_valid':False,
'01_motor_pwm_period':250, '01_temperature':0.0,'01_temperature_valid':False,
'01_motor1_enable':True, '01_motor1_throttle':0.0, '01_motor1_forward':False }"

Please note that user.test's value is on one line.
Comment 1 Marcin Garski 2006-07-03 18:05:09 EDT

I'm not sure but this bug could be fixed in attr-2.4.31 (released on 22 February
- Fix segfault in attr_list compat routines, thanks to Simon Munton

Upstream version of attr is 2.4.32.
Comment 2 Russell Strong 2006-10-07 07:19:47 EDT
So why has this bug been allowed to persist?
Comment 3 Zdenek Prikryl 2007-07-25 07:48:57 EDT
*** Bug 200623 has been marked as a duplicate of this bug. ***
Comment 4 Zdenek Prikryl 2007-07-25 08:13:38 EDT
FC5 has now been EOL'd. In FC6 and F7 attr -l works fine.

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