NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/61084 CVS commit: src/usr.bin/login



The following reply was made to PR lib/61084; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/61084 CVS commit: src/usr.bin/login
Date: Tue, 1 Dec 2026 10:25:33 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Tue Dec  1 10:25:33 UTC 2026
 
 Modified Files:
 	src/usr.bin/login: k5login.c
 
 Log Message:
 login(1): Require keytab in kerberized login with MKPAM=no.
 
 The kerberized login procedure works as follows:
 
 1. User enters a password.
 2. login(1) tries to get a ticket-granting ticket with that password,
    which may entail:
    (a) ask DNS for realm of this hostname
    (b) ask DNS for KDC of this realm
    (c) send KDC an AS-REQ
    If no TGT, fail.
 3. login(1) tries to get a service ticket for host/<hostname>.
 4. login(1) tries to verify the service ticket with the service key
    for host/<hostname>.
 
 If there is no keytab having the service key of host/<hostname>, step
 (4) won't work.  Previously, this path would fail open: if there is
 no keytab and service key, a fraudulent KDC could enable an attacker
 to log in with a password of their choice.
 
 To paper over this vulnerability, we long ago patched Heimdal's
 krb5_init_context to fail if there is no /etc/krb5.conf, so the
 vulnerability only happens between the time that you create
 /etc/krb5.conf and populate /etc/krb5.keytab, more or less.  But:
 
 (a) there's still an unnecessary window of vulnerability (which we
     assigned NetBSD-SA2023-006 for its manifestation in pam_krb5,
     which unlike kerberized login(1) is in the default build), and
 (b) that patch has the side effect of creating a terrible user
     experience for client-side SSO, which shouldn't be tangled up in
     how login(1) works.
 
 So just make the service key mandatory.
 
 PR lib/61084: kinit: krb5_init_context failed: 6
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.33 -r1.34 src/usr.bin/login/k5login.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 



Home | Main Index | Thread Index | Old Index