Skip to content

[autobackport: sssd-2-9] KCM: fix use-after-free in kcm_read_options()#8594

Merged
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8592-to-sssd-2-9
Apr 13, 2026
Merged

[autobackport: sssd-2-9] KCM: fix use-after-free in kcm_read_options()#8594
alexey-tikhonov merged 1 commit intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8592-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8592 KCM: fix use-after-free in kcm_read_options() to branch sssd-2-9, created by @alexey-tikhonov.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8592-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8592-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8592-to-sssd-2-9 --force

Original commits
0100b1c - KCM: fix use-after-free in kcm_read_options()

Backported commits

  • f2f88e8 - KCM: fix use-after-free in kcm_read_options()

Original Pull Request Body

The renew_intv string was allocated under tmp_ctx but not re-linked to mem_ctx before tmp_ctx was freed.

Assisted-By: Claude Code (Opus 4.6)

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2457467

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the kcm_read_options function in src/responder/kcm/kcm_renew.c to correctly transfer ownership of the renew_intv pointer to the specified memory context using talloc_steal. There are no review comments to address, and I have no further feedback to provide.

Copy link
Copy Markdown
Contributor

@sumit-bose sumit-bose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

backport matches original version, ACK.

bye,
Sumit

@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Accepted labels Apr 13, 2026
The `renew_intv` string was allocated under tmp_ctx but not re-linked
to mem_ctx before tmp_ctx was freed.

Assisted-By: Claude Code (Opus 4.6)
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit 0100b1c)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 Build / make-distcheck (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr8592-to-sssd-2-9 branch from f2f88e8 to c5a2b48 Compare April 13, 2026 13:23
@alexey-tikhonov alexey-tikhonov merged commit 50ae35f into SSSD:sssd-2-9 Apr 13, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants