Bug 104044

Summary: tuxstat SIGSEGV
Product: Red Hat Enterprise Linux 3 Reporter: Joe Orton <jorton>
Component: tuxAssignee: Ingo Molnar <mingo>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: tarmon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-15 21:40:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/proc/net/tux/stat none

Description Joe Orton 2003-09-09 13:19:46 UTC
Just testing tux; tuxstat always crashes for me.

# gdb /usr/sbin/tuxstat
(gdb) run
Starting program: /usr/sbin/tuxstat
 
Program received signal SIGSEGV, Segmentation fault.
0x004ca1d7 in rawmemchr () from /lib/tls/libc.so.6
(gdb) where
#0  0x004ca1d7 in rawmemchr () from /lib/tls/libc.so.6
#1  0x085c9613 in ?? ()
#2  0x004be200 in _IO_str_init_static_internal () from /lib/tls/libc.so.6
#3  0x004b19e7 in vsscanf () from /lib/tls/libc.so.6
#4  0x004ac8ad in sscanf () from /lib/tls/libc.so.6
#5  0x080486a2 in main (argc=1, argv=0x85c9613) at tuxstat.c:79
(gdb)

sscanf(tmp, "%i\n%n", &objectname_len, &parsed_chars);

at which point tmp = buf + 61 and len = 61 i.e. the sscanf is reading
past the end of the read() dat.

I'll attach my /proc/net/tux/stat.

Comment 1 Joe Orton 2003-09-09 13:21:08 UTC
Created attachment 94324 [details]
/proc/net/tux/stat

Comment 3 Ingo Molnar 2005-09-15 21:41:16 UTC
*** Bug 107057 has been marked as a duplicate of this bug. ***