-
Bug
-
Resolution: Unresolved
-
Minor
-
rhel-9.6
-
None
-
cockpit-343-1.el9
-
No
-
Low
-
1
-
rhel-cockpit
-
1
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
25Q3 - July/16
-
Unspecified
-
Unspecified
-
Unspecified
-
None
Trying to build cockpit with ASAN+UBSAN support (spec file attached), it appears that the project doesn't build because of a test failure:
test-ssh-add: pam_ssh_add: src/pam-ssh-add/pam-ssh-add.c:349:3: runtime error: null pointer passed as argument 1, which is declared to never be null
The root cause is passing pamh through a stack of multiple functions, with pamh initialized to NULL initially, which is prohibited by pam_modutil_sanitize_helper_fds declaration:
1 test-ssh-add.c test_keys 347 ret = pam_ssh_add_load (NULL, fix->pw, "mock-socket", fix->password); 2 test-ssh-add.c test_key_environment 365 ret = pam_ssh_add_load (NULL, fix->pw, NULL, NULL); 3 test-ssh-add.c test_key_environment 381 ret = pam_ssh_add_load (NULL, fix->pw, "mock-socket", NULL); 1 test-ssh-add.c run_test_agent_environment 207 ret = pam_ssh_add_start_agent (NULL, fix->pw, xdg_runtime, NULL, NULL); 2 test-ssh-add.c test_failed_agent 251 ret = pam_ssh_add_start_agent (NULL, fix->pw, NULL, &sock, &pid); 3 test-ssh-add.c test_bad_agent_vars 274 ret = pam_ssh_add_start_agent (NULL, fix->pw, NULL, &sock, &pid); 4 test-ssh-add.c test_good_agent_vars 296 ret = pam_ssh_add_start_agent (NULL, fix->pw, NULL, &sock, &pid);
Call stacks:
- pam_ssh_add_load() > run_as_user() > setup_child() > pam_modutil_sanitize_helper_fds()
- pam_ssh_add_start_agent() > run_as_user() > setup_child() > pam_modutil_sanitize_helper_fds()
There is also a warning on a different test:
src/common/test-jsonfds.c: In function 'test_print_string_memory_safety': src/common/test-jsonfds.c:320:32: warning: 'reps' may be used uninitialized in this function [-Wmaybe-uninitialized] 320 | for (gint i = length - reps + 1; i <= length; i++) | ~~~~~~~^~~~~~
- links to
-
RHBA-2025:149436 cockpit bug fix and enhancement update