Skip to content

KCM: fix TGT renewal use-after-free and stabilize test - #9005

Open
danlavu wants to merge 3 commits into
SSSD:masterfrom
danlavu:kcm-fix-tgt-renewal-uaf
Open

KCM: fix TGT renewal use-after-free and stabilize test#9005
danlavu wants to merge 3 commits into
SSSD:masterfrom
danlavu:kcm-fix-tgt-renewal-uaf

Conversation

@danlavu

@danlavu danlavu commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
  • Fix use-after-free where auth_data->ccname pointed at a short-lived tmp_ctx ccache name freed before the tevent renewal callback (caused flaky renewals against bogus names like KCM:p).
  • Free auth_data on strdup / tevent_create_immediate failure paths.
  • Widen the system test ticket lifetime/poll window now that renewal uses the correct ccache.

Replaces the exploratory work in #8857.

Co-authored-by: Cursor cursoragent@cursor.com
Model used: Cursor Sonnet 5

Dan Lavu and others added 3 commits July 24, 2026 14:13
auth_data->ccname pointed at cc->name on a short-lived tmp_ctx that is
freed before the tevent immediate renewal callback runs. Copy the name
onto auth_data so krb5_child renews the correct KCM ccache.

Co-authored-by: Cursor <cursoragent@cursor.com>
Model used: Cursor Sonnet 5
Avoid leaking the partially initialized auth_data when strdup or
tevent_create_immediate fails in kcm_creds_check_times().

Co-authored-by: Cursor <cursoragent@cursor.com>
Model used: Cursor Sonnet 5
Use a 10s lifetime and 30s renewable life so renew_till stays past
endtime, and poll for half-life plus slack after the UAF fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Model used: Cursor Sonnet 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants