[sssd PR#5872][opened] p11_child: Fixes for authentication
by dpward
URL: https://github.com/SSSD/sssd/pull/5872
Author: dpward
Title: #5872: p11_child: Fixes for authentication
Action: opened
PR body:
"""
This addresses several issues when searching for a token for (pre-)authentication, in particular when `--wait_for_card` is used. It includes a partial fix for #5025 (RHBZ 1989996), so that tokens for authentication may be inserted into any slot on a single PKCS #11 module.
This also includes fixes for possible memory leaks and unhandled error conditions in this part of the code.
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5872/head:pr5872
git checkout pr5872
2 years, 4 months
[sssd PR#5901][opened] utils: ignore systemd and sd-pam process in get_active_uid_linux()
by pbrezina
URL: https://github.com/SSSD/sssd/pull/5901
Author: pbrezina
Title: #5901: utils: ignore systemd and sd-pam process in get_active_uid_linux()
Action: opened
PR body:
"""
We iterate processes in /proc to get the list of active users (users
that has any process running). However, recent change in systemd makes
systemd and sd-pam process ligner for few more seconds when the user has
logged out which breaks the no-session functionality in pam responder.
If user is logged in, another process then systemd and sd-pam must be
running. Therefore we can just ignore these from the list.
```
admin 351997 0.4 0.0 22648 14636 ? Ss 13:25 0:00 /usr/lib/systemd/systemd --user
admin 351999 0.0 0.0 201464 7756 ? S 13:25 0:00 (sd-pam)
```
Resolves: https://github.com/SSSD/sssd/issues/5900
:fixes: Quick log out and log in did not correctly refresh
user's initgroups in `no_session` PAM schema due to lingering
systemd processes.
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5901/head:pr5901
git checkout pr5901
2 years, 4 months
[sssd PR#5902][opened] SSS_CLIENT: fixed few covscan issues
by alexey-tikhonov
URL: https://github.com/SSSD/sssd/pull/5902
Author: alexey-tikhonov
Title: #5902: SSS_CLIENT: fixed few covscan issues
Action: opened
PR body:
"""
Fixes following covscan issues:
```
Error: TAINTED_SCALAR (CWE-20):
sssd-2.6.1/src/sss_client/subid/sss_subid.c:75: tainted_argument: Calling function "sss_cli_make_request_with_checks" taints argument "*repbuf".
sssd-2.6.1/src/sss_client/subid/sss_subid.c:94: identity_transfer: Passing "repbuf + 4UL" as argument 2 to function "safealign_memcpy", which sets "num_results" to the dereference of that argument.
sssd-2.6.1/src/sss_client/subid/sss_subid.c:94: tainted_data_transitive: Call to function "safealign_memcpy" with tainted argument "*repbuf" transitively taints "num_results".
sssd-2.6.1/src/sss_client/subid/sss_subid.c:116: tainted_data: Passing tainted expression "num_results * 16UL" to "malloc", which uses it as an allocation size.
sssd-2.6.1/src/sss_client/subid/sss_subid.c:116: remediation: Ensure that tainted values are properly sanitized, by checking that their values are within a permissible range.
# 114| }
# 115|
# 116|-> *ranges = malloc(num_results * sizeof(struct subid_range));
# 117| if (!*ranges) {
# 118| free(repbuf);
Error: TAINTED_SCALAR (CWE-20):
sssd-2.6.1/src/sss_client/subid/sss_subid.c:75: tainted_argument: Calling function "sss_cli_make_request_with_checks" taints argument "*repbuf".
sssd-2.6.1/src/sss_client/subid/sss_subid.c:94: identity_transfer: Passing "repbuf + 4UL" as argument 2 to function "safealign_memcpy", which sets "num_results" to the dereference of that argument.
sssd-2.6.1/src/sss_client/subid/sss_subid.c:94: tainted_data_transitive: Call to function "safealign_memcpy" with tainted argument "*repbuf" transitively taints "num_results".
sssd-2.6.1/src/sss_client/subid/sss_subid.c:122: tainted_data: Using tainted variable "num_results" as a loop boundary.
sssd-2.6.1/src/sss_client/subid/sss_subid.c:122: remediation: Ensure that tainted values are properly sanitized, by checking that their values are within a permissible range.
# 120| }
# 121|
# 122|-> for (uint32_t c = 0; c < num_results; ++c) {
# 123| SAFEALIGN_COPY_UINT32(&val, repbuf + index, &index);
# 124| (*ranges)[c].start = val;
Error: TAINTED_SCALAR (CWE-20):
sssd-2.6.1/src/sss_client/subid/sss_subid.c:176: tainted_argument: Calling function "shadow_subid_list_owner_ranges" taints argument "amount".
sssd-2.6.1/src/sss_client/subid/sss_subid.c:183: tainted_data: Using tainted variable "amount" as a loop boundary.
sssd-2.6.1/src/sss_client/subid/sss_subid.c:183: remediation: Ensure that tainted values are properly sanitized, by checking that their values are within a permissible range.
# 181| *result = false;
# 182|
# 183|-> for (int i = 0; i < amount; ++i) {
# 184| if ((range[i].start <= start) &&
# 185| (range[i].start + range[i].count >= end)) {
```
Resolves: https://github.com/SSSD/sssd/issues/5878
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5902/head:pr5902
git checkout pr5902
2 years, 4 months