From owner-freebsd-stable@FreeBSD.ORG Fri Sep 26 07:08:41 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 748C0673; Fri, 26 Sep 2014 07:08:41 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 34B72827; Fri, 26 Sep 2014 07:08:41 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id EAB4AA737; Fri, 26 Sep 2014 07:08:33 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 00457386B; Fri, 26 Sep 2014 09:08:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Brandon Allbery Subject: Re: 10.1 BETA2 World - Breaks saslauthd References: <3DA4B666-AB81-4F25-ABAE-DDC163F41E20@FreeBSD.org> <542430EB.1040804@tundraware.com> Date: Fri, 26 Sep 2014 09:08:34 +0200 In-Reply-To: (Brandon Allbery's message of "Thu, 25 Sep 2014 11:18:52 -0400") Message-ID: <86ppeieu4t.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Gustau Perez , FreeBSD stable , Tim Daneliuk , Dimitry Andric X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 07:08:41 -0000 Brandon Allbery writes: > To me the implication is that before the MFC, PAM had a potentially > quite severe security issue involving either incorrect fallback to a > default configuration or not correctly handling error returns from a > PAM stack --- either of which could result in unauthorized users being > permitted access. No, that's a different issue. This patch fixes a potential segfault (see http://bugs.freebsd.org/83099). However, I have recevied reports that gdm (amongst others) actually want to be able to call pam_login_access without a host or tty. The following patch makes that possible: Index: lib/libpam/modules/pam_login_access/pam_login_access.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libpam/modules/pam_login_access/pam_login_access.c (revision 272101) +++ lib/libpam/modules/pam_login_access/pam_login_access.c (working copy) @@ -94,8 +94,10 @@ PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", user); + if (login_access(user, "***unknown***") !=3D 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", user); } =20 return (PAM_AUTH_ERR); Please test and report as soon as possible so I can get it into 10. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no