From owner-freebsd-bugs Thu Mar 22 7:10:14 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4972537B729 for ; Thu, 22 Mar 2001 07:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2MFA2P38165; Thu, 22 Mar 2001 07:10:02 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B021637B71E for ; Thu, 22 Mar 2001 07:09:15 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2MF9Fm35630; Thu, 22 Mar 2001 07:09:15 -0800 (PST) (envelope-from nobody) Message-Id: <200103221509.f2MF9Fm35630@freefall.freebsd.org> Date: Thu, 22 Mar 2001 07:09:15 -0800 (PST) From: andrew@nfr.net To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/26000: unchecked return in vm/swap_pager.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 26000 >Category: kern >Synopsis: unchecked return in vm/swap_pager.c >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: Thu Mar 22 07:10:02 PST 2001 >Closed-Date: >Last-Modified: >Originator: Andrew Lambeth >Release: 4.1 and 4.2 >Organization: NFR Security >Environment: FreeBSD better.andrew.creep.net 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Thu Feb 22 10:10:45 EST 2001 andrew@better.andrew.creep.net:/usr/src/sys/compile/BETTER i386 >Description: There is an unchecked return from zinit() at line 307 in vm/swap_pager.c this call will return NULL if kmem malloc limits have been increased beyond a certain point (~800MB) by modifying the algorithm or limits in kmeminit(). It is unlikely that anyone would experience this in any normal situation, still it seems like there should be a panic there. >How-To-Repeat: Increase kmem malloc limits to >800MB and boot the kernel. It will run fine until the first time it tries to page out, and then crash by dereferencing the NULL pointer swap_zone. >Fix: Index: swap_pager.c =================================================================== RCS file: /big/cvs/freebsd_sys_41/vm/swap_pager.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -r1.1.1.1 -r1.1.1.1.2.1 314a315,318 > if(swap_zone == NULL) { > panic("swap_zone == NULL"); > } > >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message