From owner-freebsd-bugs Tue Nov 7 14:20:11 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 94D0237B479 for ; Tue, 7 Nov 2000 14:20:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA93461; Tue, 7 Nov 2000 14:20:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from mgate10.so-net.ne.jp (mgate10.so-net.ne.jp [210.139.254.157]) by hub.freebsd.org (Postfix) with ESMTP id BF5CD37B4C5 for ; Tue, 7 Nov 2000 14:10:39 -0800 (PST) Received: from mail.ba2.so-net.ne.jp (mail.ba2.so-net.ne.jp [210.139.254.21]) by mgate10.so-net.ne.jp (8.9.3/3.7W00101717) with ESMTP id HAA26667 for ; Wed, 8 Nov 2000 07:10:33 +0900 (JST) Received: from ba2.so-net.ne.jp (pee726f.tokynt01.ap.so-net.ne.jp [202.238.114.111]) by mail.ba2.so-net.ne.jp (8.8.8/3.7W99081617) with ESMTP id HAA05294 for ; Wed, 8 Nov 2000 07:10:32 +0900 (JST) Received: (from sanewo@localhost) by ba2.so-net.ne.jp (8.11.1/8.11.1) id eA7MA2504427; Wed, 8 Nov 2000 07:10:02 +0900 (JST) (envelope-from sanewo) Message-Id: <200011072210.eA7MA2504427@ba2.so-net.ne.jp> Date: Wed, 8 Nov 2000 07:10:02 +0900 (JST) From: sanewo@ba2.so-net.ne.jp Reply-To: sanewo@ba2.so-net.ne.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/22670: yet another pam_ssh core dump Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 22670 >Category: bin >Synopsis: pam_ssh dumps core due to bug in env_destroy() >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 07 14:20:04 PST 2000 >Closed-Date: >Last-Modified: >Originator: Takanori Saneto >Release: FreeBSD 5.0-CURRENT i386 >Organization: an individual >Environment: System: FreeBSD muse.sanewo 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed Nov 8 00:26:46 JST 2000 sanewo@muse.sanewo:/sd1/obj/usr/src/sys/MUSE i386 pam_ssh.c as of 2000/11/08 >Description: env_destroy() in pam_ssh.c sets garbage to environ when called before env_commit(), which may cause core dump later in the application. >How-To-Repeat: Under xdm+pam environment, when ssh-agent invocation fail (because of missing /dev/random, etc.) , xdm dumps core. >Fix: following patch (in conjunction with PR bin/22614 patch) should fix the problem. diff -u -r1.8 pam_ssh.c --- pam_ssh.c 2000/07/16 05:52:28 1.8 +++ pam_ssh.c 2000/11/07 22:01:45 @@ -176,7 +176,8 @@ { struct env_entry *p; - env_swap(self, 0); + if (self->e_committed) + env_swap(self, 0); SLIST_FOREACH(p, &self->e_head, ee_entries) { free(p->ee_env); free(p); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message