Subject: bin/22286: dump crashes with bogus arguments
To: None <gnats-bugs@gnats.netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 07/27/2003 21:22:47
>Number: 22286
>Category: bin
>Synopsis: dump crashes with bogus arguments
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 27 19:23:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Christian Biere
>Release: NetBSD 1.6U
>Organization:
>Environment:
>Description:
Out of curiousity I tried the following:
$ /sbin/dump -0 -f /dev/null /dev/zero
dump: Cannot open `/etc/fstab': Permission denied
DUMP: Can't open /etc/fstab for dump table information: Permission
denied
DUMP: rawread: lseek fails
DUMP: rawread: lseek2 fails: Permission denied!
DUMP: rawread: lseek fails
DUMP: rawread: lseek2 fails: Permission denied!
DUMP: rawread: lseek fails
DUMP: rawread: lseek2 fails: Permission denied!
DUMP: rawread: lseek fails
DUMP: rawread: lseek2 fails: Permission denied!
DUMP: rawread: lseek fails
DUMP: rawread: lseek2 fails: Permission denied!
Segmentation fault
#0 0x080a14d0 in fs_read_sblock (superblock=0x80ad040 "") at
ffs_inode.c:86
#1 0x08055a4a in main (argc=1, argv=0xbfbff728) at main.c:423
#2 0x08049ac4 in ___start ()
(gdb) info lo
i = 12728
ns = 0
(gdb) p sblock_try
$1 = {65536, 8192, 0, 262144, -1}
(gdb) p superblock
$2 = 0x80ad040 ""
$ /sbin/dump -0 -f /dev/null /dev/null
dump: Cannot open `/etc/fstab': Permission denied
DUMP: Can't open /etc/fstab for dump table information: Permission
denied
Segmentation fault
#0 0x08082f4a in rawread (blkno=65536, buf=0x80ad040 "", size=65536)
at rcache.c:205
#1 0x080a14e3 in fs_read_sblock (superblock=0x80ad040 "") at
ffs_inode.c:86
#2 0x08055a4a in main (argc=1, argv=0xbfbff728) at
main.c:423
#3 0x08049ac4 in ___start ()
(gdb) p ufsib
$7 = (struct ufsi *) 0x0
(gdb) info lo
cnt = 0
i = 1208673842
(gdb) p *buf
$3 = 0 '\0'
$ ident /sbin/dump
/sbin/dump:
$NetBSD: crt0.c,v 1.12 2001/12/30 23:23:38 thorpej Exp $
$NetBSD: itime.c,v 1.14 2002/11/16 14:15:35 itojun Exp $
$NetBSD: main.c,v 1.55 2003/04/02 10:39:24 fvdl Exp $
$NetBSD: optr.c,v 1.30 2003/04/02 10:39:24 fvdl Exp $
$NetBSD: dumprmt.c,v 1.29 2001/12/25 12:06:26 lukem Exp $
$NetBSD: rcache.c,v 1.20 2003/04/19 23:29:12 tls Exp $
$NetBSD: tape.c,v 1.40 2003/04/02 10:39:24 fvdl Exp $
$NetBSD: traverse.c,v 1.41 2003/05/01 11:29:55 fvdl Exp $
$NetBSD: unctime.c,v 1.14 2003/04/02 10:39:25 fvdl Exp $
$NetBSD: ffs_inode.c,v 1.12 2003/04/02 10:39:24 fvdl Exp $
$NetBSD: ffs_bswap.c,v 1.20 2003/04/16 14:20:25 yamt Exp $
>How-To-Repeat:
See above.
>Fix:
N/A
>Release-Note:
>Audit-Trail:
>Unformatted: