From owner-freebsd-current Sun Jan 20 12: 1:31 2002 Delivered-To: freebsd-current@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id C1C4637B400; Sun, 20 Jan 2002 12:01:28 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 91FE0532C; Sun, 20 Jan 2002 21:01:27 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "Andrey A. Chernov" Cc: markm@freebsd.org, current@freebsd.org Subject: Re: Step4, pam_opie getpwnam check fix for review References: <20020120194510.GA24069@nagual.pp.ru> From: Dag-Erling Smorgrav Date: 20 Jan 2002 21:01:26 +0100 In-Reply-To: <20020120194510.GA24069@nagual.pp.ru> Message-ID: Lines: 17 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Andrey A. Chernov" writes: > Bug: > getpwnum() (or getlogin() in earlier stage) may return NULL under > various complex circumstanes, but following code not expect it and may > cause NULL pointer reference and core dump. > > Fix: > Add check for NULL and return PAM_AUTH_ERR Approved (unless Mark objects). Strictly speaking, I think getlogin() should be replaced with the result of pam_get_item(PAM_RUSER), but that's separate issue. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message