]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix Leash crash when ticket autorenewal fails 1103/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 19 Aug 2020 15:37:12 +0000 (11:37 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 9 Sep 2020 22:29:33 +0000 (18:29 -0400)
commit7fc4cdae79d0689afed32f9bcfeb28f410a9d79c
treeac26655874e0ad8524510bfd9adb4b8b57ca3985
parent01164c45c84e2292a2c29ff125d5d2e8fb9cd675
Fix Leash crash when ticket autorenewal fails

CLeashView::RenewTicket() falls back to an ImportTicket or InitTicket
operation if ticket renewal fails.  A 2004 commit (from the old
pismere repository) added code to heuristically determine whether
Leash's cache was imported by comparing the MSLSA cache principal name
to ticketinfo.Krb5.principal.  Commit
9bc411e72fce5bed3ed00ae5b09f8c239309bae0 broke this code by removing
the call to initialize ticketinfo.Krb5 and by making
ticketinfo.Krb5.principal ephemeral.  The strcmp() call now crashes
the process with a null dereference.

Fix the crash by removing the heuristic detection of imported tickets,
using the current value of m_importedTickets (which should be correct
unless Leash was restarted after the tickets were obtained) to decide
whether to import or initialize tickets.

ticket: 8938
tags: pullup
target_version: 1.17-next
target_version: 1.18-next
src/windows/leash/LeashView.cpp