mailing list archives
Re: [Pkg-xfce-devel] Bug#639151: Bug#639151: Bug#639151: Local privilege escalation
From: Yves-Alexis Perez <corsac () debian org>
Date: Thu, 25 Aug 2011 17:54:23 +0200
On mer., 2011-08-24 at 20:55 +0200, Yves-Alexis Perez wrote:
And, out of curiosity, how would you achieve privilege escalation? You
should be able to erase/rewrite arbitrary files, including /etc/shadow,
but you don't really have control on what's written there.
In gdm (CVE-2011-0727 I guess) the issue was that a g_file_copy() was
run as root from files under user control (.dmrc and the avatar), to a
cache dir with write permissions (afaict). So it was easy to put
whatever stuff you need in the original file and make a symlink
to /etc/shadow in the destination folder so the g_file_copy() would
res = g_file_copy (src_file,
I'm not too sure what G_FILE_COPY_OVERWRITE means, if it truncate()s and
write over of if it unlink()s and start fresh (digging in glib to find
out). Apparenlty in the fallback case (not sure if it's the case here)
it ends up doing a g_file_replace()).
In any case, in lightdm case, for .Xauthority file it uses
g_file_replace() which creates a temporary file and then rename over the
new file, so in the worst case you overwrite a system file with
Same thing for .dmrc, you can overwrite system files but with dmrc data
which look like
so it doesn't look easy to gain root access with that.
LightDM maintains a cache for dmrc files in /var/cache/lightdm but the
folder is created 0700 so it doesn't look like one can put symlinks
there and have it use a user-controled .dmrc.
All in all, I'm not too sure there's a privilege escalation for
Xauthority/.dmrc files (but if one exists, I'm interested in how to do
it, by curiosity). But you still damage pretty much any arbitrary file,
which is still an easy DoS.
Description: This is a digitally signed message part
- Re: [Pkg-xfce-devel] Bug#639151: Bug#639151: Bug#639151: Local privilege escalation Yves-Alexis Perez (Aug 25)