Bugzilla – Bug 1197465
AUDIT-FIND: CVE-2022-27816: swhkd: The Unprivileged Server Process Uses a Fixed Temporary File in /tmp/swhks.pid
Last modified: 2022-04-14 08:56:35 UTC
+++ This bug was initially created as a clone of Bug #1196890 This is to track parent bug issue 2.f): ## 2.f) The Unprivileged Server Process Uses a Fixed Temporary File in /tmp/swhks.pid Similar to 2.a). Consequences: - local application DoS: if an attacker places the PID of an existing process there (e.g. PID 1), other users cannot start the server any more. - local user file corruption: if kernel symlink protection is off, then the PID file can be a symlink to a private file in the user's home directory which will then be overwritten with the PID information. Suggested Fix: ## 3.a) All PID and socket files should be placed in non-public locations: - The server PID file and socket belong in `/run/user/$PKEXEC_UID`.
I have patched CVE-2022-27816 in the following commit: https://github.com/waycrate/swhkd/commit/4b8442fef512441c9155186956c767a120c12974 A review from the OpenSuse security team would be really helpful.
Yes the patch should suffice.
I consider this finding fixed and will close the bug accordingly.