Bug 356241 - foremost crashes when run with verbose option
foremost crashes when run with verbose option
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: formost (Show other bugs)
7
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Toshio Kuratomi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-29 04:25 EDT by Karel Volný
Modified: 2007-12-12 14:59 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.5.2-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-12 14:52:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Volný 2007-10-29 04:25:34 EDT
Description of problem:
When trying to run foremost with verbose option, it crashes on opening the 
audit file.

Version-Release number of selected component (if applicable):
foremost-1.5-1.fc7

How reproducible:
always

Steps to Reproduce:
1. in my case, run 'foremost -v -i /dev/sdb7'
  
Actual results:
Segmentation fault

Expected results:
normal operation :-)

Additional info:
This did not happen last time I used foremost (1.5) on my Gentoo box, so I 
report against Fedora rather than upstream.

# gdb --args foremost -v -i /dev/sdb7
GNU gdb Red Hat Linux (6.6-16.fc7rh)
Copyright (C) 2006 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 "x86_64-redhat-linux-gnu"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/foremost -v -i /dev/sdb7
Foremost version 1.5 by Jesse Kornblum, Kris Kendall, and Nick Mikus

Program received signal SIGSEGV, Segmentation fault.
0x0000003a39c77160 in strlen () from /lib64/libc.so.6
(gdb) backtrace
#0  0x0000003a39c77160 in strlen () from /lib64/libc.so.6
#1  0x0000003a39c460bb in vfprintf () from /lib64/libc.so.6
#2  0x0000003a39ce4749 in __vfprintf_chk () from /lib64/libc.so.6
#3  0x00000000004036d3 in audit_msg (s=0x6cb010, format=0x40aba3 "Foremost 
version %s by %s") at state.c:193
#4  0x000000000040372a in write_audit_header (s=0x2c) at state.c:138
#5  0x00000000004038b0 in open_audit_file (s=0x6cb010) at state.c:165
#6  0x0000000000401bb2 in main (argc=4, argv=0x7fff380a8a08) at main.c:264
#7  0x0000003a39c1dab4 in __libc_start_main () from /lib64/libc.so.6
#8  0x00000000004015e9 in _start ()
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
Comment 1 Toshio Ernie Kuratomi 2007-12-04 14:49:58 EST
It looks like the problem is that var args handling in the audit_msg() function
is wrong.  This is only showing up on x86_64 which may be why you're not seeing
it on Gentoo.  Patch applied and building now.
Comment 2 Toshio Ernie Kuratomi 2007-12-04 18:35:09 EST
* Patches accepted upstream.
* Bodhi should be pushing the patched version to the testing repository soon.
Comment 3 Karel Volný 2007-12-06 09:28:51 EST
thankyou for resolving this issue
Comment 4 Fedora Update System 2007-12-06 15:53:09 EST
foremost-1.5.2-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update foremost'
Comment 5 Fedora Update System 2007-12-06 15:55:56 EST
foremost-1.5.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update foremost'
Comment 6 Fedora Update System 2007-12-12 14:52:56 EST
foremost-1.5.2-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2007-12-12 14:59:16 EST
foremost-1.5.2-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

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