Date: Tue, 10 Aug 2004 01:59:23 GMT From: Matthew Luckie <mjl@luckie.org.nz> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/70236: uninitialised parameters passed to kernel_sysctl Message-ID: <200408100159.i7A1xNQi088858@www.freebsd.org> Resent-Message-ID: <200408100200.i7A20csp089982@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70236 >Category: kern >Synopsis: uninitialised parameters passed to kernel_sysctl >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 10 02:00:38 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Matthew Luckie >Release: FreeBSD 4.10 >Organization: University of Waikato >Environment: FreeBSD lycra.luckie.org.nz 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #7: Wed Jul 28 08:39:51 NZST 2004 root@lycra.luckie.org.nz:/files/freebsd_src/sys/compile/lycra i386 >Description: I found two instances of kernel_sysctl being called without olen being set. >How-To-Repeat: N/A >Fix: --- sys/nwfs/nwfs_vfsops.c.orig Tue Aug 10 13:51:32 2004 +++ sys/nwfs/nwfs_vfsops.c Tue Aug 10 13:51:52 2004 @@ -394,6 +394,7 @@ name[0] = CTL_HW; name[1] = HW_NCPU; + olen = sizeof(ncpu); error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen); if (error == 0 && ncpu > 1) printf("warning: nwfs module compiled without SMP support."); --- sys/netsmb/smb_subr.c.orig Tue Aug 10 13:49:14 2004 +++ sys/netsmb/smb_subr.c Tue Aug 10 13:50:14 2004 @@ -375,6 +375,7 @@ name[0] = CTL_HW; name[1] = HW_NCPU; + olen = sizeof(ncpu); error = kernel_sysctl(curproc, name, 2, &ncpu, &olen, NULL, 0, &plen); if (error) return error; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408100159.i7A1xNQi088858>