Skip to content

[autobackport: sssd-2-9] LDAP: free tmp var within the loop#8488

Merged
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8484-to-sssd-2-9
Mar 2, 2026
Merged

[autobackport: sssd-2-9] LDAP: free tmp var within the loop#8488
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8484-to-sssd-2-9

Conversation

@sssd-bot

@sssd-bot sssd-bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8484 LDAP: free tmp var within the loop 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 [email protected]:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8484-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8484-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8484-to-sssd-2-9 --force

Original commits
8c1e20b - LDAP: free tmp var within the loop

Backported commits

  • f46e2c3 - LDAP: free tmp var within the loop

Original Pull Request Body

inside sdap_add_incomplete_groups() to avoid memory pressure
/ cache trashing if handling large groups set.

@sssd-bot
sssd-bot requested a review from thalman March 2, 2026 10:35
@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Waiting for review labels Mar 2, 2026

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

Copy link
Copy Markdown

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 is a backport that aims to reduce memory pressure in sdap_add_incomplete_groups by freeing a temporary variable within the loop. While initializing msg to NULL is a good practice, the added call to talloc_zfree(msg) inside the loop appears to introduce a critical double-free bug, as the memory is likely already managed by a per-iteration talloc context.

Comment thread src/providers/ldap/sdap_async_initgroups.c

@thalman thalman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK

inside `sdap_add_incomplete_groups()` to avoid memory pressure
 / cache trashing if handling large groups set.

Reviewed-by: Tomáš Halman <[email protected]>
(cherry picked from commit 8c1e20b)
@sssd-bot

sssd-bot commented Mar 2, 2026

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-pr8484-to-sssd-2-9 branch from f46e2c3 to f83ee12 Compare March 2, 2026 18:58
@alexey-tikhonov alexey-tikhonov added Performance Performance related patches and removed Performance Performance related patches labels Mar 2, 2026
@alexey-tikhonov
alexey-tikhonov merged commit e830df8 into SSSD:sssd-2-9 Mar 2, 2026
10 of 11 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