# Rationale for +security: this bug can lead to a local DoS by
# preventing the user from deactivating the screensaver
tags 396201 +patch +security
thanks

This bug seems to be caused by over-active filtering of the 
environment variables. In src/gs-job.c and src/gs-window-x11.c 
are two arrays containing allowed environment variables. These 
allow f.ex. LANG, but none of the LC_* variables.

This will prevent user from deactivating the screen saver if his 
LANG and LC_CTYPE differ from each other, f.ex. when LANG=C and 
LC_CTYPE is any of the UTF-8 locales.

Another sympton of this bug is that password dialog is displayed 
in language defined by LANG, not by LC_MESSAGES as it should be.

-kimju
diff -urN gnome-screensaver-2.14.3/src/gs-job.c 
gnome-screensaver-2.14.3-kimju/src/gs-job.c
--- gnome-screensaver-2.14.3/src/gs-job.c       2006-07-13 02:15:12.000000000 
+0300
+++ gnome-screensaver-2.14.3-kimju/src/gs-job.c 2007-01-04 21:07:52.147895294 
+0200
@@ -574,7 +574,20 @@
                 "XAUTHORITY",
                 "XAUTHLOCALHOSTNAME",
                 "LANG",
-                "LANGUAGE"
+                "LANGUAGE",
+                "LC_CTYPE",
+                "LC_NUMERIC",
+                "LC_TIME",
+                "LC_COLLATE",
+                "LC_MONETARY",
+                "LC_MESSAGES",
+                "LC_PAPER",
+                "LC_NAME",
+                "LC_ADDRESS",
+                "LC_TELEPHONE",
+                "LC_MEASUREMENT",
+                "LC_IDENTIFICATION",
+                "LC_ALL"
         };
 
         env = g_ptr_array_new ();
diff -urN gnome-screensaver-2.14.3/src/gs-window-x11.c 
gnome-screensaver-2.14.3-kimju/src/gs-window-x11.c
--- gnome-screensaver-2.14.3/src/gs-window-x11.c        2006-07-26 
23:45:15.000000000 +0300
+++ gnome-screensaver-2.14.3-kimju/src/gs-window-x11.c  2007-01-04 
21:07:49.943757544 +0200
@@ -583,6 +583,19 @@
                 "KRBTKFILE",
                 "LANG",
                 "LANGUAGE",
+                "LC_CTYPE",
+                "LC_NUMERIC",
+                "LC_TIME",
+                "LC_COLLATE",
+                "LC_MONETARY",
+                "LC_MESSAGES",
+                "LC_PAPER",
+                "LC_NAME",
+                "LC_ADDRESS",
+                "LC_TELEPHONE",
+                "LC_MEASUREMENT",
+                "LC_IDENTIFICATION",
+                "LC_ALL",
                 "RUNNING_UNDER_GDM"
         };
 

Reply via email to