NetBSD Problem Report #10478
Received: (qmail 25321 invoked from network); 29 Jun 2000 21:34:50 -0000
Message-Id: <20000629213442.9334.qmail@gcc.ansic.net>
Date: 29 Jun 2000 21:34:42 -0000
From: root@gcc.ansic.net
Reply-To: qball@ansic.net
To: gnats-bugs@gnats.netbsd.org
Subject: pkg tripwire
X-Send-Pr-Version: 3.95
>Number: 10478
>Category: pkg
>Synopsis: Tripwire seg fualts on NetBSD/SPARC-Fix included
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: agc
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 29 21:35:01 +0000 2000
>Closed-Date: Fri Jul 14 09:00:43 +0000 2000
>Last-Modified: Fri Jul 14 09:00:43 +0000 2000
>Originator: System Administrator, LeRoy Miller
>Release: 1.4.2
>Organization:
ANSIC Networks
>Environment:
System: NetBSD gcc 1.4.2 NetBSD 1.4.2 (GCC) #0: Fri Jun 16 22:37:29 EDT 2000 root@gcc:/usr/src/sys/arch/sparc/compile/GCC sparc
>Description:
Tripwire pkg segfaults on sparc systems. tw assumes st_size is 32 bits
when it's 64bit (off_t) when it calls the printf() statement in the
patch it try's to dereferance the second half of the st_size field on
the stack as a string (for teh %s) changing %7d to %7lld fixes this
from utils.c printf(" %-9.9s %7d %s", owner, statbuf.st_size,
a_time + 4);
>How-To-Repeat:
Try to run tripwire on a sparc/NetBSD machine
>Fix:
diff -c format
*** utils.c Thu Jun 29 16:24:07 2000
--- /usr/pkgsrc/security/tripwire/work.sparc/tripwire-1.2/src/utils.c.orig Mon Jul 25 12:23:16 1994
***************
*** 697,703 ****
print_perm((uint32)statbuf.st_mode);
! (void) printf(" %-9.9s %7lld %s", owner, statbuf.st_size,
a_time + 4);
printf(" %s\n", name);
--- 697,703 ----
print_perm((uint32)statbuf.st_mode);
! (void) printf(" %-9.9s %7d %s", owner, statbuf.st_size,
a_time + 4);
printf(" %s\n", name);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: agc
State-Changed-When: Fri Jul 14 02:00:01 PDT 2000
State-Changed-Why:
agc applied the patch from the PR - thanks for fixing this.
Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: agc
Responsible-Changed-When: Fri Jul 14 02:00:01 PDT 2000
Responsible-Changed-Why:
agc took responsibility for this one.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.