From ellard@eecs.harvard.edu Sat Feb 28 06:04:21 2004 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22A8216A4CE for ; Sat, 28 Feb 2004 06:04:21 -0800 (PST) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id E65DF43D31 for ; Sat, 28 Feb 2004 06:04:20 -0800 (PST) (envelope-from ellard@eecs.harvard.edu) Received: from ant.eecs.harvard.edu (ant.eecs.harvard.edu [140.247.62.111]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 5B82354C673 for ; Sat, 28 Feb 2004 09:04:20 -0500 (EST) Received: by ant.eecs.harvard.edu (Postfix, from userid 465) id 44A1530D; Sat, 28 Feb 2004 09:04:20 -0500 (EST) Message-Id: <20040228140420.44A1530D@ant.eecs.harvard.edu> Date: Sat, 28 Feb 2004 09:04:20 -0500 (EST) From: Daniel Ellard Reply-To: Daniel Ellard To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 63489 >Category: bin >Synopsis: top(1) finger(1) segfault when using NIS groups to restrict logins >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 28 06:10:22 PST 2004 >Closed-Date: >Last-Modified: Sat May 24 19:23:06 UTC 2008 >Originator: Daniel Ellard >Release: FreeBSD 4.7-RELEASE-p25 i386, FreeBSD 4.8-RELEASE-p15 i386, FreeBSD 4.9-RELEASE-p2 i386 >Organization: >Environment: FreeBSD gerbil.eecs.harvard.edu 4.7-RELEASE-p25 FreeBSD 4.7-RELEASE-p25 #10: Wed Feb 11 13:36:48 EST 2004 ellard@gerbil.eecs.harvard.edu:/usr/obj/usr/freebsd_4.7/src/sys/RODENT i386 System: FreeBSD ant.eecs.harvard.edu 4.8-RELEASE-p15 FreeBSD 4.8-RELEASE-p15 #5: Fri Feb 20 10:27:42 EST 2004 ellard@ant.eecs.harvard.edu:/usr/obj/usr/freebsd_4.8/src/sys/ANT i386 FreeBSD shrew.eecs.harvard.edu 4.9-RELEASE-p2 FreeBSD 4.9-RELEASE-p2 #3: Wed Feb 11 17:39:10 EST 2004 ellard@shrew.eecs.harvard.edu:/usr/obj/usr/freebsd_4.9/src/sys/SHREW i386 >Description: "top" or "finger foo" segfaults on a machine with logins limited to a subset of NIS user groups. (There might be other apps that die the same way, but these are the first two I found, and top is especially important to me.) This only happens when logins are restricted; letting in everyone (i.e. "+:::::::::") doesn't cause the problem. The programs die in getpwent. How-To-Repeat: Run "top" or "finger foo" on a machine with logins limited to a subset of NIS user groups. (There might be other apps that die the same way, but these are the first two I found.) Specific steps: Note: if you already have any lines of the form "+@xyz:::::::::" in your /etc/passwd file, then you can skip steps 1 and 2. 1. Create an NIS group of users with a specific name (in this example, I'll call it foo). 2. Use vipw to edit /etc/passwd. Comment out any references to NIS groups (i.e. "+:::::::::"). Add "+@foo:::::::::" as the last line. 3. Run "top" or "finger foo". ("foo" doesn't have to be the name of a real user -- it can be anything. The point is to have finger try to look up a user.) Watch as it segfaults in getpwent. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: Responsible-Changed-From-To: gnats-admin->freebsd-bugs Responsible-Changed-By: linimon Responsible-Changed-When: Mon Mar 29 11:27:26 PST 2004 Responsible-Changed-Why: I forgot to reassign it when I cleaned up the formatting. Oops. http://www.freebsd.org/cgi/query-pr.cgi?pr=63489 State-Changed-From-To: open->closed State-Changed-By: maxim State-Changed-When: Sat Jul 17 22:27:16 GMT 2004 State-Changed-Why: Duplicate of bin/45990. http://www.freebsd.org/cgi/query-pr.cgi?pr=63489 State-Changed-From-To: closed->open State-Changed-By: maxim State-Changed-When: Sat Jul 17 23:23:50 GMT 2004 State-Changed-Why: It looks like a different bug in getpwent() code. http://www.freebsd.org/cgi/query-pr.cgi?pr=63489 >Unformatted: