Created attachment 250918 [details] patch After updating to latest 14.1 BETA xdm crashed when Ctrl-C was pressed on the logon screen. Running xdm in debug mode showed: SetPrompt(0, <NULL>, LOGIN_PROMPT_NOT_SHOWN(0)) SetPrompt(1, <NULL>, LOGIN_PROMPT_NOT_SHOWN(0)) pam_msg: PAM_PROMPT_ECHO_ON (2): ' Login:' SetPrompt(0, Login:, LOGIN_PROMPT_ECHO_ON(1)) RedrawFail('Login incorrect or forbidden by policy', 0) dispatching :0 RedrawFail('Login incorrect or forbidden by policy', 0) (CTRL-C now) GreetDone: , (password is 0 long) REMANAGE_DISPLAY Done dispatch :0 xdm error (pid 8751): pam_authenticate failure: Conversation failure Unsecure display :0 Greet connection closed Manager wait returns pid: 8751 sig 11 core 0 code 0 Display exited with unknown status 2816 I fixed it with the attached patch (not knowing if this is correct :-)). Apparently pam_get_item() can return NULL in &user but pam_xdg.c continues with it...
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=cca0ce62f367d03ed429bf99e41e6aca8cb7f2ac commit cca0ce62f367d03ed429bf99e41e6aca8cb7f2ac Author: Andre Albsmeier <mail@fbsd2.e4m.org> AuthorDate: 2024-05-27 06:31:34 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-05-27 06:33:14 +0000 pam_xdg: pam_get_item can return NULL Fix pam_xdg as pam_get_item can return NULL, this happens when pressing control + C in xdm for example. MFC after: 1 week PR: 279268 lib/libpam/modules/pam_xdg/pam_xdg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Commited, thanks a lot.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=9fe726012df9a125a40df0b70a2e5c6f6b7bb913 commit 9fe726012df9a125a40df0b70a2e5c6f6b7bb913 Author: Andre Albsmeier <mail@fbsd2.e4m.org> AuthorDate: 2024-05-27 06:31:34 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-06-03 07:35:41 +0000 pam_xdg: pam_get_item can return NULL Fix pam_xdg as pam_get_item can return NULL, this happens when pressing control + C in xdm for example. MFC after: 1 week PR: 279268 (cherry picked from commit cca0ce62f367d03ed429bf99e41e6aca8cb7f2ac) lib/libpam/modules/pam_xdg/pam_xdg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)