Bug 189106

Summary: segmentation fault in attr
Product: [Fedora] Fedora Reporter: Russell Strong <rstrong>
Component: attrAssignee: Zdenek Prikryl <zprikryl>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: james.antill, mgarski, sct
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-25 12:13:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Russell Strong 2006-04-16 09:44:35 UTC
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 22:05:09 UTC

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 11:19:47 UTC
So why has this bug been allowed to persist?

Comment 3 Zdenek Prikryl 2007-07-25 11:48:57 UTC
*** Bug 200623 has been marked as a duplicate of this bug. ***

Comment 4 Zdenek Prikryl 2007-07-25 12:13:38 UTC
FC5 has now been EOL'd. In FC6 and F7 attr -l works fine.