Bug 184962 - app-forensics/chkrootkit-0.47 crashes with segmentation fault due to a missing blank in the script
Bug#: 184962 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: forensics@gentoo.org Reported By: f_c@everymail.net
Component: Applications
URL: 
Summary: app-forensics/chkrootkit-0.47 crashes with segmentation fault due to a missing blank in the script
Keywords:  
Status Whiteboard: 
Opened: 2007-07-11 15:20 0000
Description:   Opened: 2007-07-11 15:20 0000
in /usr/sbin/chkrootkit (version 0.47) in line 181, a blank is missing in the
line "chkutmp()" (should be: "chkutmp ()"). when the interpreter reaches that
line, a segmentation fault occurs.

adding the missing blank fixes the problem.

Reproducible: Always

Steps to Reproduce:
1. # emerge =app-forensics/chkrootkit-0.47
2. # chkrootkit

------- Comment #1 From Jakub Moc (RETIRED) 2007-10-20 08:01:16 0000 -------
*** Bug 196493 has been marked as a duplicate of this bug. ***

------- Comment #2 From Hypnos 2007-10-20 18:16:54 0000 -------
(In reply to comment #1)
> *** Bug 196493 has been marked as a duplicate of this bug. ***
> 

The duplicate bug contains a patch that fixes the problem.  Something in the
code trips a bug with the -O2 gcc optimization flag.

------- Comment #3 From Peter Volkov 2008-10-06 19:45:23 0000 -------
Created an attachment (id=167487) [details]
chkrootkit-0.48-some-overruns-fixes.patch

Better show changes as a patch - easier to review.
And, please, attach changes to bugzilla - then we do not loose them.

BTW, could somebody provide test case as this crash is not reproducible on my
system?

------- Comment #4 From Peter Volkov 2008-10-06 20:01:31 0000 -------
Although I failed to reproduce the issue, patch seems to be correct. Applied.
Reopen bug if problem is still reproducible in >=chkrootkit-0.48-r1 and attach
wtmp files so I could reproduce crash too. Thanks you bazbar for report and 
Sourav Mandal for the fix.