Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port passkey covscan fixes to sssd-2.9 #6876

Closed
wants to merge 2 commits into from

Conversation

ikerexxe
Copy link
Contributor

Original PR for master branch at #6737

Fixes following covscan issues:
```
Error: CLANG_WARNING:
sssd-2.9.0/src/krb5_plugin/passkey/passkey_utils.c:562:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'data'
 #  560|       }
 #  561|
 #  562|->     json_decref(jroot);
 #  563|       return message;
 #  564|   }

Error: UNREACHABLE (CWE-561):
sssd-2.9.0/src/responder/pam/pamsrv_passkey.c:1039: unreachable: This code cannot be reached: "if (!pctx->passkey_auth) {
...".
 # 1037|   #endif
 # 1038|
 # 1039|->     if (!pctx->passkey_auth) {
 # 1040|           return false;
 # 1041|       }
```

Resolves: SSSD#6733

Signed-off-by: Iker Pedrosa <[email protected]>

Reviewed-by: Justin Stephenson <[email protected]>
Reviewed-by: Pavel Březina <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
Rename `sss_passkey_prefix_json_data()` to
`sss_passkey_message_from_reply_json()`.

Signed-off-by: Iker Pedrosa <[email protected]>

Reviewed-by: Justin Stephenson <[email protected]>
Reviewed-by: Pavel Březina <[email protected]>
Reviewed-by: Sumit Bose <[email protected]>
@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Aug 14, 2023
@alexey-tikhonov alexey-tikhonov self-assigned this Aug 14, 2023
@alexey-tikhonov
Copy link
Member

Thanks, ACK.

@justin-stephenson justin-stephenson self-assigned this Aug 14, 2023
Copy link
Contributor

@justin-stephenson justin-stephenson left a comment

Choose a reason for hiding this comment

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

Ack.

@alexey-tikhonov
Copy link
Member

Pushed PR: #6876

  • sssd-2-9
    • aba98a4 - passkey: rename function
    • f79ce53 - passkey: fix two covscan issues

@ikerexxe ikerexxe deleted the port_passkey_covscan_fixes branch January 4, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport This should go to target branch only. Pushed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants