Skip to content

oidc_child: add missing NULL checks and avoid double-free#8785

Merged
alexey-tikhonov merged 3 commits into
SSSD:masterfrom
sumit-bose:jwt_fixes
Jun 8, 2026
Merged

oidc_child: add missing NULL checks and avoid double-free#8785
alexey-tikhonov merged 3 commits into
SSSD:masterfrom
sumit-bose:jwt_fixes

Conversation

@sumit-bose

Copy link
Copy Markdown
Contributor

No description provided.

@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 introduces safety checks to prevent null pointer dereferences and potential crashes. Specifically, it validates that the certificate and private key are successfully extracted from the PKCS#12 file in oidc_child_get_jwk.c, and ensures that the PKCS#12 client credentials path is not null before attempting to open it in oidc_child_json.c. Additionally, it removes an unnecessary json_decref call on payload_b64 when json_pack fails, as the reference is already stolen by the 'o' format specifier. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@alexey-tikhonov alexey-tikhonov added Trivial A single reviewer is sufficient to review the Pull Request backport-to-sssd-2-13 no-backport This should go to target branch only. and removed backport-to-sssd-2-13 labels Jun 8, 2026
The reference is always stolen if the 'o' format specifier is used even
in the case of errors.

Reviewed-by: Alexey Tikhonov <[email protected]>
@sssd-bot

sssd-bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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


🟢 CodeQL (success)
🟢 osh-diff-scan:fedora-rawhide-x86_64:upstream (success)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-44-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 testing-farm:fedora-43-x86_64:upstream (success)
🟢 testing-farm:fedora-44-x86_64:centos-stream-10 (success)
🟢 testing-farm:fedora-44-x86_64:upstream (success)
🔴 testing-farm:fedora-rawhide-x86_64:upstream (failure)
🟢 Analyze (target) / cppcheck (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🔴 ci / intgcheck (fedora-45) (failure)
🟢 ci / prepare (success)
🟢 ci / system (centos-10) (success)
🔴 ci / system (fedora-43) (failure)
🟡 ci / system (fedora-44) (in_progress)
🔴 ci / system (fedora-45) (failure)
➖ Coverity scan / coverity (skipped)
🟢 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.

@alexey-tikhonov
alexey-tikhonov merged commit c2f9fff into SSSD:master Jun 8, 2026
10 of 18 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. Trivial A single reviewer is sufficient to review the Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants