]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix double-free in KDC TGS processing 1312/head
authorAndreas Schneider <asn@samba.org>
Fri, 4 Aug 2023 07:54:06 +0000 (09:54 +0200)
committerGreg Hudson <ghudson@mit.edu>
Mon, 7 Aug 2023 18:38:21 +0000 (14:38 -0400)
commit88a1701b423c13991a8064feeb26952d3641d840
tree1db91d902617e2f691d84c14f76c118fe5548ea0
parent0ceab6c363e65fb21d3312a663f2b9b569ecc415
Fix double-free in KDC TGS processing

When issuing a ticket for a TGS renew or validate request, copy only
the server field from the outer part of the header ticket to the new
ticket.  Copying the whole structure causes the enc_part pointer to be
aliased to the header ticket until krb5_encrypt_tkt_part() is called,
resulting in a double-free if handle_authdata() fails.

[ghudson@mit.edu: changed the fix to avoid aliasing enc_part rather
than check for aliasing before freeing; rewrote commit message]

CVE-2023-39975:

In MIT krb5 release 1.21, an authenticated attacker can cause a KDC to
free the same pointer twice if it can induce a failure in
authorization data handling.

ticket: 9101 (new)
tags: pullup
target_version: 1.21-next
src/kdc/do_tgs_req.c