Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C07F084EB1 for ; Fri, 8 Sep 2023 09:06:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id SQ-oZoXet4By for ; Fri, 8 Sep 2023 09:06:22 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 0EB0A84CE8 for ; Fri, 8 Sep 2023 09:06:22 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 069E5FBDB; Fri, 8 Sep 2023 09:06:22 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 8 Sep 2023 09:06:22 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-10] src/lib/libpam/modules/pam_ksu To: source-changes@NetBSD.org Approved: for-source-only Reply-To: martin@netbsd.org X-Mailer: log_accum Message-Id: <20230908090622.069E5FBDB@cvs.NetBSD.org> Module Name: src Committed By: martin Date: Fri Sep 8 09:06:21 UTC 2023 Modified Files: src/lib/libpam/modules/pam_ksu [netbsd-10]: pam_ksu.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #357): lib/libpam/modules/pam_ksu/pam_ksu.c: revision 1.11 pam_ksu(8): Allow homedir access during kuserok. Otherwise, the default kuserok logic to look at ~targetuser/.k5login would be blocked by the security measure to thwart NetBSD-SA2023-005. (There are other ways, e.g. setting SYSTEM-K5LOGIN in /etc/krb5.conf so the file is /etc/k5login.d/user instead of ~user/.k5login, but that's not the default configuration and there are plenty of deployments that rely on ~user/.k5login today.) I reviewed libkrb5 for homedir access checks. There are three: 1. krb5_config_parse_file_multi, called only by: - verify_krb5_conf -- not relevant - krb5_config_parse_file -- not used here as far as I can tell, only by libhdb ldap logic and test code in heimdal - krb5_set_config_files -- used here only via krb5_init_context, which is done at this point 2. plugin_get_hosts in krbhst.c, used to look up hosts for KDC I/O, which shouldn't be happening at this point, so this is almost certainly unreachable; also it only appears to control whether some old plugin API can be used, long after we have read the krb5 config controlling which plugins are available, so this is probably harmless 3. krb5_kuserok, which is the one we want to allow Note: This will have to be updated again in the next Heimdal update, which eliminates the global homedir access flag in favour of making the default per-context homedir access flag conditional on !issuid. To generate a diff of this commit: cvs rdiff -u -r1.9.36.1 -r1.9.36.2 src/lib/libpam/modules/pam_ksu/pam_ksu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.