tripwire --init Segmentation Fault

Bug #1968430 reported by Brad Thompson
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
tripwire (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu 21.10
Release: 21.10

apt-cache policy tripwire
tripwire:
  Installed: 2.4.3.7-3
  Candidate: 2.4.3.7-3
  Version table:
 *** 2.4.3.7-3 500
        500 http://ca.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status

tripwire --init
Please enter your local passphrase:
Parsing policy file: /etc/tripwire/tw.pol
Generating the database...
*** Processing Unix File System ***
Software interrupt forced exit: Segmentation Fault
Segmentation fault (core dumped)

The partial output of /var/crash/_usr_sbin_tripwire.0.crash

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Sat Apr 9 12:36:13 2022
DistroRelease: Ubuntu 21.10
ExecutablePath: /usr/sbin/tripwire
ExecutableTimestamp: 1587715517
ProcCmdline: tripwire
ProcCwd: /var/crash
ProcEnviron:
 SHELL=/bin/bash
 LANGUAGE=en_CA:en
 LANG=en_CA.UTF-8
 TERM=xterm-256color
 PATH=(custom, user)
ProcMaps:
 00400000-00401000 r--p 00000000 08:01 4600708 /usr/sbin/tripwire
 00401000-0066d000 r-xp 00001000 08:01 4600708 /usr/sbin/tripwire
 0066d000-00706000 r--p 0026d000 08:01 4600708 /usr/sbin/tripwire
 00707000-0071c000 r--p 00306000 08:01 4600708 /usr/sbin/tripwire
 0071c000-00722000 rw-p 0031b000 08:01 4600708 /usr/sbin/tripwire
 00722000-00729000 rw-p 00000000 00:00 0
 0122f000-0129a000 rw-p 00000000 00:00 0 [heap]
 7f7fb4e8b000-7f7fb4f8b000 rw-p 00000000 00:00 0
 7f7fb4f8b000-7f7fb4f8c000 r--p 00000000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4f8c000-7f7fb4fb4000 r-xp 00001000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fb4000-7f7fb4fbe000 r--p 00029000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fbe000-7f7fb4fc0000 r--p 00032000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fc0000-7f7fb4fc2000 rw-p 00034000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fc2000-7f7fb4fea000 r--p 00000000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb4fea000-7f7fb517e000 r-xp 00028000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb517e000-7f7fb51d6000 r--p 001bc000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51d6000-7f7fb51d7000 ---p 00214000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51d7000-7f7fb51db000 r--p 00214000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51db000-7f7fb51dd000 rw-p 00218000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51dd000-7f7fb51ea000 rw-p 00000000 00:00 0
 7f7fb51ea000-7f7fb51eb000 r--p 00000000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51eb000-7f7fb51ec000 r-xp 00001000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ec000-7f7fb51ed000 r--p 00002000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ed000-7f7fb51ee000 r--p 00002000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ee000-7f7fb51ef000 rw-p 00003000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb5208000-7f7fb520f000 r--s 00000000 08:01 5248344 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
 7f7fb520f000-7f7fb5780000 r--p 00000000 08:01 4588564 /usr/lib/locale/locale-archive
 7f7fb5780000-7f7fb57e2000 rw-p 00000000 00:00 0
 7ffdd4834000-7ffdd4855000 rw-p 00000000 00:00 0 [stack]
 7ffdd48b3000-7ffdd48b7000 r--p 00000000 00:00 0 [vvar]
 7ffdd48b7000-7ffdd48b9000 r-xp 00000000 00:00 0 [vdso]
 ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall]
ProcStatus:
 Name: tripwire
 Umask: 0022
 State: S (sleeping)
 Tgid: 1711201
 Ngid: 0
 Pid: 1711201
 PPid: 1709566
 TracerPid: 0
 Uid: 0 0 0 0
 Gid: 0 0 0 0
 FDSize: 256
 Groups: 0
 NStgid: 1711201
 NSpid: 1711201
 NSpgid: 1711201
 NSsid: 1709566
 VmPeak: 13280 kB
 VmSize: 13280 kB
 VmLck: 0 kB
 VmPin: 0 kB
 VmHWM: 4452 kB
 VmRSS: 4452 kB
 RssAnon: 848 kB
 RssFile: 3604 kB
 RssShmem: 0 kB
 VmData: 1968 kB
 VmStk: 132 kB
 VmExe: 2480 kB
 VmLib: 1788 kB
 VmPTE: 60 kB
 VmSwap: 0 kB
 HugetlbPages: 0 kB
 CoreDumping: 1
 THP_enabled: 1
 Threads: 1
 SigQ: 0/14973
 SigPnd: 0000000000000000
 ShdPnd: 0000000000000000
 SigBlk: 0000000000000000
 SigIgn: 0000000000001000
 SigCgt: 00000000418000fc
 CapInh: 0000000000000000
 CapPrm: 000001ffffffffff
 CapEff: 000001ffffffffff
 CapBnd: 000001ffffffffff
 CapAmb: 0000000000000000
 NoNewPrivs: 0
 Seccomp: 0
 Seccomp_filters: 0
 Speculation_Store_Bypass: not vulnerable
 SpeculationIndirectBranch: always enabled
 Cpus_allowed: f
 Cpus_allowed_list: 0-3
 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
 Mems_allowed_list: 0
 voluntary_ctxt_switches: 45
 nonvoluntary_ctxt_switches: 20
Signal: 11
Uname: Linux 5.13.0-39-generic x86_64
UserGroups: N/A
CoreDump: base64
 H4sICAAAAAAC/0NvcmVEdW1wAA==
 7L0HnBXV+f8/23dZFq4FXftYgEUFxr6KxrFj5doxahz7YuMKFiwJY9SIMeUmalxj1PGriZtEk6smEWO7iVHXfm2RxDZYIvYxakRR98/lvJ8L5zCHXVbw+/vmv8fX8vF5zucpp865c8tM32WvXaurqhwptc43nIWS4/jO4sV32p11K3xVpjWkEOeXXzSn66vE1rVEyqRj2a6u/D+e6NMynF+KIxazq13UrnRcul2+acl2uZzOz1bpuIhdffl/QvTFU3W7wEDTLsbOnaLb5Qw07bLVSpGsV6XZFep1NO0c2l2Y84fp0xc1NAbA

Revision history for this message
Brad Thompson (lattimro) wrote :
Download full text (114.5 KiB)

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Sat Apr 9 12:36:13 2022
DistroRelease: Ubuntu 21.10
ExecutablePath: /usr/sbin/tripwire
ExecutableTimestamp: 1587715517
ProcCmdline: tripwire
ProcCwd: /var/crash
ProcEnviron:
 SHELL=/bin/bash
 LANGUAGE=en_CA:en
 LANG=en_CA.UTF-8
 TERM=xterm-256color
 PATH=(custom, user)
ProcMaps:
 00400000-00401000 r--p 00000000 08:01 4600708 /usr/sbin/tripwire
 00401000-0066d000 r-xp 00001000 08:01 4600708 /usr/sbin/tripwire
 0066d000-00706000 r--p 0026d000 08:01 4600708 /usr/sbin/tripwire
 00707000-0071c000 r--p 00306000 08:01 4600708 /usr/sbin/tripwire
 0071c000-00722000 rw-p 0031b000 08:01 4600708 /usr/sbin/tripwire
 00722000-00729000 rw-p 00000000 00:00 0
 0122f000-0129a000 rw-p 00000000 00:00 0 [heap]
 7f7fb4e8b000-7f7fb4f8b000 rw-p 00000000 00:00 0
 7f7fb4f8b000-7f7fb4f8c000 r--p 00000000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4f8c000-7f7fb4fb4000 r-xp 00001000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fb4000-7f7fb4fbe000 r--p 00029000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fbe000-7f7fb4fc0000 r--p 00032000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fc0000-7f7fb4fc2000 rw-p 00034000 08:01 4589666 /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
 7f7fb4fc2000-7f7fb4fea000 r--p 00000000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb4fea000-7f7fb517e000 r-xp 00028000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb517e000-7f7fb51d6000 r--p 001bc000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51d6000-7f7fb51d7000 ---p 00214000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51d7000-7f7fb51db000 r--p 00214000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51db000-7f7fb51dd000 rw-p 00218000 08:01 4589689 /usr/lib/x86_64-linux-gnu/libc.so.6
 7f7fb51dd000-7f7fb51ea000 rw-p 00000000 00:00 0
 7f7fb51ea000-7f7fb51eb000 r--p 00000000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51eb000-7f7fb51ec000 r-xp 00001000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ec000-7f7fb51ed000 r--p 00002000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ed000-7f7fb51ee000 r--p 00002000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb51ee000-7f7fb51ef000 rw-p 00003000 08:01 4589711 /usr/lib/x86_64-linux-gnu/libnss_files.so.2
 7f7fb5208000-7f7fb520f000 r--s 00000000 08:01 5248344 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
 7f7fb520f000-7f7fb5780000 r--p 00000000 08:01 4588564 /usr/lib/locale/locale-archive
 7f7fb5780000-7f7fb57e2000 rw-p 00000000 00:00 0
 7ffdd4834000-7ffdd4855000 rw-p 00...

Brad Thompson (lattimro)
description: updated
Brad Thompson (lattimro)
description: updated
affects: emboss (Ubuntu) → tripwire (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in tripwire (Ubuntu):
status: New → Confirmed
Revision history for this message
Xu Zhen (xuzhen666) wrote :

I also met the "Software interrupt forced exit: Segmentation Fault" bug after upgrading from 20.04 to 22.04

I recompiled the package on my PPA (https://launchpad.net/~xuzhen666/+archive/ubuntu/lts) for 22.04 without any modifications, and it works well.

The package in official repository is imported from Debian unstable, maybe the different compilers or libraries cause this on Ubuntu.

Revision history for this message
doweller (do-weller) wrote (last edit ):

"Software interrupt forced exit: Segmentation Fault" after upgrade from 20.04 to 22.04 as of today;
The workaround RESOLVE_IDS_TO_NAMES=false found on https://github.com/Tripwire/tripwire-open-source/issues/48 did not help: error occurs later but is still there

Revision history for this message
Alexis Wilke (alexis-m2osw) wrote :

I tested all the previously working solutions and it still crashed (as reported by others).

Xu Zhen solution (see comment #3), however, worked like a charm. I installed his version from his PPA and no crash on --init and on --check. So recompiling with the correct dependencies has to be just it. It would be great if the official package would do that so we don't have to rely on the community to get a non-crashing version in Ubuntu.

Revision history for this message
Stephen E. Dudek (sdudek48174) wrote (last edit ):

I recently upgraded a system that had been running Ubuntu 20.04 to 22.04 and encountered the same "Software interrupt forced exit: Segmentation Fault" bug. I've had no issues with tripwire going all the way back to Ubuntu 12 for this system.

I also tested this on a parallel system that I set up the same way. It also segfaults in the same manner as the production system.

To echo what Alexis Wilke said, I have tried all the other suggestions and they all segmentation fault, but have stopped short installing Xu Zhen's Personal Package Archives. I echo all the sentiments expressed in comment #5.

Lastly, I have rebuilt tripwire from source, and it no longer produces the segmentation fault.

Revision history for this message
Chris Schanzle (cschanzle) wrote :

This seems to be an issue with the static linking and nss libraries being loaded and changed over time.
https://github.com/systemd/systemd/issues/29337

While I could dig into rebuilding the package myself from sources, I would really appreciate the package mainter/distro doing this for me.

I installed the tripwire-dbgsym and ran under gdb to get this backtrace:

gdb $(which tripwire)
set args --init
set auto-load safe-path /
run
Starting program: /usr/sbin/tripwire --init
Please enter your local passphrase:
Parsing policy file: /etc/tripwire/tw.pol
Generating the database...
*** Processing Unix File System ***
warning: File "/usr/lib/x86_64-linux-gnu/libthread_db.so.1" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/lib/x86_64-linux-gnu/libthread_db.so.1
:/usr/lib/x86_64-linux-gnu/libthread_db.so.1
:/usr/lib/x86_64-linux-gnu/libthread_db.so.1
:/usr/lib/x86_64-linux-gnu/libthread_db.so.1
".
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b736a4 in _nss_systemd_is_blocked () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
(gdb) bt
#0 0x00007ffff7b736a4 in _nss_systemd_is_blocked () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
#1 0x00007ffff7b7e7e6 in _nss_systemd_getgrgid_r () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
#2 0x00000000005e48a9 in getgrgid_r ()
#3 0x00000000005e4673 in getgrgid ()
#4 0x0000000000481dcf in cUnixFSServices::GetGroupName (this=<optimized out>, group_id=40835, tstrGroup=...) at ../core/unixfsservices.cpp:569
#5 0x000000000045980a in cFSPropDisplayer::InitForProp (this=0x73e5d0, pFCO=<optimized out>, propIdx=<optimized out>) at ../fs/./../core/fsservices.h:353
#6 0x0000000000453c46 in cFSPropDisplayer::InitForFCO (this=0x73e5d0, ifco=0x804150) at ../fs/fspropdisplayer.cpp:248
#7 0x000000000042777c in cTripwireUtil::CalcProps (pFCO=0x804150, pSpec=<optimized out>, pCalc=<optimized out>, pPD=0x73e5d0)
    at ./src/tripwire/tripwireutil.cpp:79
#8 0x0000000000423870 in util_ProcessDir (dbIter=..., pIter=0x9499e0, pSpec=0x779eb0, pPC=0x7332c0, pPD=0x73e5d0) at ./src/tripwire/generatedb.cpp:92
#9 0x00000000004239cf in util_ProcessDir (dbIter=..., pIter=0x969fa0, pSpec=0x779eb0, pPC=0x7332c0, pPD=0x73e5d0) at ./src/tripwire/generatedb.cpp:105
#10 0x000000000042410e in cGenerateDb::Execute (specList=..., db=..., pPD=0x73e5d0, pBucket=<optimized out>, flags=<optimized out>)
    at ./src/tripwire/generatedb.cpp:198
#11 0x000000000042bd73 in cTWModeDbInit::Execute (this=0x7327a0, pQueue=0x7fffffffe390) at ./src/tripwire/twcmdline.cpp:789
#12 0x000000000041934b in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ./src/tripwire/tripwiremain.cpp:229
(gdb) quit

Revision history for this message
Chris Schanzle (cschanzle) wrote :

I remade the deb package from the same sources on a currently updated system with no change. Removing '--enable-static' from debian/rules resulted a working 'tripwire --init'. Hope it helps someone else. Brief notes (I was building on 'nebula' and running on 'muggle2').

search for the amd64 package for ubuntu at
https://debian.pkgs.org/sid/debian-main-amd64/
Package Homepage https://launchpad.net/ubuntu/jammy/+source/tripwire

ssh nebula
# [update system]
cd ~/dpkg-rebuild
mkdir tripwire
cd !$
wget \
  https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/tripwire/2.4.3.7-4/tripwire_2.4.3.7-4.dsc \
  https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/tripwire/2.4.3.7-4/tripwire_2.4.3.7.orig.tar.gz \
  https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/tripwire/2.4.3.7-4/tripwire_2.4.3.7-4.debian.tar.xz

# verify checksums on web page
sha256sum *

dpkg-source -x tripwire_2.4.3.7-4.dsc # tab completion is nice

# bump version + changelog entry - see https://wiki.debian.org/BuildingTutorial
dch -n

time debuild -b -uc -us
# 2m47s on nebula, i9-12900K. didn't seem parallel at all

cd ..
ls # looky at all those shiny new debs!
ls -l tripwire_2.4.3.7-4.1_amd64.*
-rw-r--r-- 1 schanzle 771div 148316 Jun 10 18:12 tripwire_2.4.3.7-4.1_amd64.build
-rw-r--r-- 1 schanzle 771div 7096 Jun 10 18:12 tripwire_2.4.3.7-4.1_amd64.buildinfo
-rw-r--r-- 1 schanzle 771div 1391 Jun 10 18:12 tripwire_2.4.3.7-4.1_amd64.changes
-rw-r--r-- 1 schanzle 771div 1864346 Jun 10 18:12 tripwire_2.4.3.7-4.1_amd64.deb

# installed on muggle2...tripwire --init....suspense...
# dang, still crashed.
Software interrupt forced exit: Segmentation Fault
real 7m28.401s

# try rebuilding w/o --enable-static in debian/rules
# YES!! Successful 'tripwire --init'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.