Summary: | After 5.25 update kscreenlocker crashes if using howdy | ||
---|---|---|---|
Product: | [Plasma] kscreenlocker | Reporter: | Vlad <vlad> |
Component: | kcheckpass | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bhush94, kde, kde, MurzNN, nate |
Priority: | VHI | ||
Version: | 5.25.0 | ||
Target Milestone: | --- | ||
Platform: | Archlinux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kscreenlocker/commit/13dfae3fbc7e4d7e8b6692aed65baa272252ec36 | Version Fixed In: | 5.25.2 |
Attachments: | coredump |
Description
Vlad
2022-06-19 12:33:15 UTC
And here is the issue in Howdy bug tracker: https://github.com/boltgolt/howdy/issues/679 Note that this is not specifically Howdy, it's a regression that has broken pam-python: segfault at 8 ip 00007fb39a81ba50 sp 00007fb39b022140 error 4 in pam_python.so[7fb39a818000+5000] I tried to update pam_python to python3 version from this(https://github.com/castlabs/pam-python) repository, crash still happens same way. But I noticed what exactly leads to crash: it's probably messages howdy sends to lockerscreen. When I disable detection_notice and confirmation messages in howdy config making it completely silent, lockerscreen sort of works in testing mode, but unfortunately still crashes after unlocking screen for real. Also with 'detection_notice = true' crash happens after howdy face recognition. Created attachment 150003 [details]
coredump
Possibly it relates to https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/59/ This crash is deep in howdy code. That's a howdy bug until shown otherwise. >it's a regression that has broken pam-python:
Including a dummy test case with pam-python? If so I'll revisit our side.
Here's a test case that still results in a segfault and does not interact with Howdy in any way: ``` import subprocess import os import glob import syslog def doAuth(pamh): pamh.conversation(pamh.Message(pamh.PAM_TEXT_INFO, "Attempting face detection")) return pamh.PAM_SYSTEM_ERR def pam_sm_authenticate(pamh, flags, args): return doAuth(pamh) def pam_sm_open_session(pamh, flags, args): return doAuth(pamh) def pam_sm_close_session(pamh, flags, argv): return pamh.PAM_SUCCESS def pam_sm_setcred(pamh, flags, argv): return pamh.PAM_SUCCESS ``` Seems to be the call to pamh.conversation that causes it? thanks int PamWorker::converse(int n, const struct pam_message **msg, struct pam_response **resp, void *data) If there's no prompt we left "resp" alone. pam_python sends garbage in then deletes it. I can fix it my side. Thanks for making the minimal example. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/83 Git commit 1ff38e1ddbe575d4e99c0c5e9e1c01d69142f088 by David Edmundson. Committed on 21/06/2022 at 15:10. Pushed by davidedmundson into branch 'master'. Initialise pam response in all converse conditions This turned out to be an issue for pam_python when sending an info/error message that shouldn't have a response some code still tried to free the result of any prompt. Somewhat questionable, but we should still be returning a valid struct full of nulls. M +6 -6 greeter/pamauthenticator.cpp https://invent.kde.org/plasma/kscreenlocker/commit/1ff38e1ddbe575d4e99c0c5e9e1c01d69142f088 Thanks for the quick fix! Git commit 13dfae3fbc7e4d7e8b6692aed65baa272252ec36 by Nate Graham, on behalf of David Edmundson. Committed on 21/06/2022 at 16:33. Pushed by ngraham into branch 'Plasma/5.25'. Initialise pam response in all converse conditions This turned out to be an issue for pam_python when sending an info/error message that shouldn't have a response some code still tried to free the result of any prompt. Somewhat questionable, but we should still be returning a valid struct full of nulls. (cherry picked from commit 1ff38e1ddbe575d4e99c0c5e9e1c01d69142f088) M +6 -6 greeter/pamauthenticator.cpp https://invent.kde.org/plasma/kscreenlocker/commit/13dfae3fbc7e4d7e8b6692aed65baa272252ec36 |