Bugzilla – Bug 1196446
VUL-0: CVE-2022-21945: cscreen: usage of fixed path /tmp/cscreen.debug
Last modified: 2022-03-11 10:16:44 UTC
+++ This bug was initially created as a clone of Bug #1196140 The cscreen package uses a fixed path /tmp/cscreen.debug in the script /usr/bin/cscreen_update_config.sh: ``` function add_window() { <...snip...> echo $_host >> /tmp/cscreen.debug echo $_status >> /tmp/cscreen.debug if [ -n "$_status" ];then echo "screen -x $session -X $_status" >> /tmp/cscreen.debug screen -x $session -X defhstatus "$_status" >>/tmp/cscreen.debug 2>&1 fi echo "Add Window $TITLE: screen -x $session -X $COMMAND" >>/tmp/cscreen.debug <...snip...> } ``` Luckily no one seems to be reading from there anymore. Without symlink protection this could be a local DoS vector against the system. By placing a FIFO in this location it could be a dedicated DoS and information leak against the update script. Please change the script either to drop this debug file by default, by using an unpredictable temporary file name, or by using a safe location for the file that is not accessible by every user in the system.
This script is called by orthos. When do we intend to lift the embargo? I changed the location to /run/cscreen/
(In reply to Olaf Hering from comment #1) > This script is called by orthos. > When do we intend to lift the embargo? I changed the location to > /run/cscreen/ It's up to us. I suggest when you have solutions ready for both issues then we can publish it.
Created attachment 856583 [details] bug1196446.patch I think this change will fix the issue.
(In reply to ohering@suse.com from comment #3) > Created attachment 856583 [details] > bug1196446.patch > > I think this change will fix the issue. Yes, using the dedicated /run/ directory is good. I'm not quite sure about the kind of debug output generated by these commands, could it be prudent to protect the debug file from world and only allow e.g. members of the same _cscreen group to read them?
yeah, I already planned to adjust the mask in tmpfile.conf.
Please use CVE-2022-21945 for this. For the other issue I'm still a bit torn and need to think about it more
Fixed upstream. https://github.com/openSUSE/cscreen/commit/e9a698cc317125300ff49d99b841f537a61fe65f