NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/61092: kerberized su(1) litters /tmp with krb5cc_* if MKPAM=no
>Number: 61092
>Category: bin
>Synopsis: kerberized su(1) litters /tmp with krb5cc_* if MKPAM=no
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 30 01:45:00 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, ...
>Organization:
Alisu's Restaurant, Inkerberated
>Environment:
>Description:
With MKPAM=no MKKERBEROS=yes, the kerberized path of su(1)
stores the target user's credentials in a randomly named
temporary file /tmp/krb5cc_${RANDOM} and sets KRB5CCNAME to
point at it in the environment of the shell it runs.
But -- unlike login(1), pam_krb5(8), and pam_ksu(8) -- it never
cleans up after itself; it leaves the credentials lying around
indefinitely, or until Officer Obie comes over to charge it
with littering.
>How-To-Repeat:
1. build with MKKERBEROS=yes MKPAM=no
2. set up a host service key in the system keytab
3. su, kerberociously
>Fix:
Fork, wait, and krb5_cc_destroy, like login(1) does:
https://nxr.netbsd.org/xref/src/usr.bin/login/login.c?r=1.105#725
Home |
Main Index |
Thread Index |
Old Index