NetBSD Problem Report #10035

Received: (qmail 20504 invoked from network); 2 May 2000 00:58:01 -0000
Message-Id: <200005020356.GAA02132@kahva.ssh.fi>
Date: Tue, 2 May 2000 06:56:51 +0300 (EEST)
From: kivinen@ssh.fi
Reply-To: kivinen@ssh.fi
To: gnats-bugs@gnats.netbsd.org
Subject: Kdump dumps core if read buffer is long
X-Send-Pr-Version: 3.95

>Number:         10035
>Category:       bin
>Synopsis:       kdump dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 02 00:59:00 +0000 2000
>Closed-Date:    Wed May 03 18:56:04 +0000 2000
>Last-Modified:  Wed May 03 18:56:04 +0000 2000
>Originator:     Tero Kivinen
>Release:        NetBSD current 2000-04-20
>Organization:
SSH Communications Security
>Environment:
System: NetBSD kahva.ssh.fi 1.4X NetBSD 1.4X (KAHVA) #0: Thu Apr 27 09:28:18 EEST 2000 ztk@kahva.ssh.fi:/usr/src/sys/arch/i386/compile/KAHVA i386

>Description:
	Kdump dumps core on line kdump.c:473, because the *(dp+1) is out
	of bounds for the last character in the buffer. 

>How-To-Repeat:
	Fetch vuescan (http://www.hamrick.com/) and run it under ktrace
	(ktrace ./vuescan). Then exit and run kdump, it will dump core.
>Fix:
	Here is a diff:
----------------------------------------------------------------------
*** kdump.c.orig	Tue May  2 06:50:17 2000
--- kdump.c	Tue May  2 06:50:52 2000
***************
*** 470,475 ****
--- 470,478 ----
  	(void)printf("       \"");
  	col = 8;
  	for (; datalen > 0; datalen--, dp++) {
+ 	  	if (datalen == 1)
+ 			(void) vis(visbuf, *dp, VIS_CSTYLE, 0);
+ 		else
  			(void) vis(visbuf, *dp, VIS_CSTYLE, *(dp+1));
  		cp = visbuf;
  		/*
>Release-Note:
>Audit-Trail:

From: Andrew Brown <atatat@atatdot.net>
To: kivinen@ssh.fi
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/10035: Kdump dumps core if read buffer is long
Date: Tue, 2 May 2000 00:01:02 -0400

 >>Number:         10035
 >>Category:       bin
 >>Synopsis:       kdump dumps core
 >...
 >>Description:
 >	Kdump dumps core on line kdump.c:473, because the *(dp+1) is out
 >	of bounds for the last character in the buffer. 

 see pr bin/9983.  the patch there has already been applied to
 -current.

 -- 
 |-----< "CODE WARRIOR" >-----|
 codewarrior@daemon.org             * "ah!  i see you have the internet
 twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
 andrew@crossbar.com       * "information is power -- share the wealth."

From: "PER4MANCE, J. Dolecek" <jdolecek@per4mance.cz>
To: kivinen@ssh.fi
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/10035: Kdump dumps core if read buffer is long
Date: Tue, 02 May 2000 19:34:55 +0200

 kivinen@ssh.fi wrote:
 > 
 > >Number:         10035
 > >Category:       bin
 > >Synopsis:       kdump dumps core
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    bin-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Mon May 01 17:59:00 PDT 2000
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Tero Kivinen
 > >Release:        NetBSD current 2000-04-20
 > >Organization:
 > SSH Communications Security
 > >Environment:
 > System: NetBSD kahva.ssh.fi 1.4X NetBSD 1.4X (KAHVA) #0: Thu Apr 27 09:28:18 EEST 2000 ztk@kahva.ssh.fi:/usr/src/sys/arch/i386/compile/KAHVA i386
 > 
 > >Description:
 >         Kdump dumps core on line kdump.c:473, because the *(dp+1) is out
 >         of bounds for the last character in the buffer.
 > 
 > >How-To-Repeat:
 >         Fetch vuescan (http://www.hamrick.com/) and run it under ktrace
 >         (ktrace ./vuescan). Then exit and run kdump, it will dump core.
 > >Fix:
 >         Here is a diff:
 > ----------------------------------------------------------------------
 > *** kdump.c.orig        Tue May  2 06:50:17 2000
 > --- kdump.c     Tue May  2 06:50:52 2000
 > ***************
 > *** 470,475 ****
 > --- 470,478 ----
 >         (void)printf("       \"");
 >         col = 8;
 >         for (; datalen > 0; datalen--, dp++) {
 > +               if (datalen == 1)
 > +                       (void) vis(visbuf, *dp, VIS_CSTYLE, 0);
 > +               else
 >                         (void) vis(visbuf, *dp, VIS_CSTYLE, *(dp+1));
 >                 cp = visbuf;
 >                 /*
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:

From: "PER4MANCE, J. Dolecek" <jdolecek@per4mance.cz>
To: kivinen@ssh.fi
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/10035: Kdump dumps core if read buffer is long
Date: Tue, 02 May 2000 19:36:10 +0200

 Sorry for the first (empty) e-mail.

 This bug should already be fixed, can you try to upgrade
 to the newest kdump and see if it works ok ?

 Jaromir

From: Tero Kivinen <kivinen@ssh.fi>
To: dolecek@ics.muni.cz
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/10035: Kdump dumps core if read buffer is long
Date: Wed, 3 May 2000 21:49:22 +0300 (EET DST)

 PER4MANCE, J. Dolecek writes:
 > This bug should already be fixed, can you try to upgrade
 > to the newest kdump and see if it works ok ?

 I checked the patch provided in the other bug report, and it should
 fix the problem. 
 -- 
 kivinen@iki.fi                               Work : +358 303 9870
 SSH Communications Security                  http://www.ssh.fi/
 SSH IPSEC Toolkit                            http://www.ssh.fi/ipsec/
State-Changed-From-To: open->closed 
State-Changed-By: jdolecek 
State-Changed-When: Wed May 3 11:55:42 PDT 2000 
State-Changed-Why:  
Already reported and fixed, thanks. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.