Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 1997 23:59:52 -0800 (PST)
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/2676: modstat passes garbage name to kernel if name is not specified
Message-ID:  <199702060759.XAA00978@w3.gv.tsc.tdk.com>
Resent-Message-ID: <199702060820.AAA10852@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2676
>Category:       bin
>Synopsis:       modstat passes garbage name to kernel if name is not specified
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb  6 00:20:02 PST 1997
>Last-Modified:
>Originator:     Don Lewis
>Organization:
TDK Semiconductor
>Release:        FreeBSD 2.1.6-internal-0225 i386
>Environment:


>Description:

	If a module name is not specified on the command line for modstat,
	it fails to initialize the name field of the lmc_stat structure
	before passing this to the ioctl() call.  This results in whatever
	random garbage is contained on the stack being used as the module
	name.

	This bug is present in all releases through -current.

>How-To-Repeat:

	Run modstat without specifying a module name.

>Fix:
	
	Clear the sbuf.name[] array in dostat() with bzero() or equivalent
	instead of just NUL terminating it.

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702060759.XAA00978>