Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
xen
:
redhat
>
pulseaudio
> pulseaudio-0.9.10-CVE-2009-1894.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pulseaudio-0.9.10-CVE-2009-1894.patch of Package pulseaudio
Reexec only after the privilegies have been broken. Fix http://blog.cr0.org/2009/07/old-school-local-root-vulnerability-in.html Lubomir Rintel <lkundrak@v3.sk> diff -up pulseaudio-0.9.10/src/daemon/main.c.CVE-2009-1894 pulseaudio-0.9.10/src/daemon/main.c --- pulseaudio-0.9.10/src/daemon/main.c.CVE-2009-1894 2009-07-16 16:43:49.000000000 +0200 +++ pulseaudio-0.9.10/src/daemon/main.c 2009-07-16 16:54:34.000000000 +0200 @@ -342,25 +342,6 @@ int main(int argc, char *argv[]) { #endif -#if defined(__linux__) && defined(__OPTIMIZE__) - /* - Disable lazy relocations to make usage of external libraries - more deterministic for our RT threads. We abuse __OPTIMIZE__ as - a check whether we are a debug build or not. - */ - - if (!getenv("LD_BIND_NOW")) { - char *rp; - - /* We have to execute ourselves, because the libc caches the - * value of $LD_BIND_NOW on initialization. */ - - putenv(pa_xstrdup("LD_BIND_NOW=1")); - pa_assert_se(rp = pa_readlink("/proc/self/exe")); - pa_assert_se(execv(rp, argv) == 0); - } -#endif - #ifdef HAVE_GETUID real_root = getuid() == 0; suid_root = !real_root && geteuid() == 0; @@ -389,6 +370,25 @@ int main(int argc, char *argv[]) { * we were started SUID. If we are started as normal root, than we * still are normal root. */ +#if defined(__linux__) && defined(__OPTIMIZE__) + /* + Disable lazy relocations to make usage of external libraries + more deterministic for our RT threads. We abuse __OPTIMIZE__ as + a check whether we are a debug build or not. + */ + + if (!getenv("LD_BIND_NOW")) { + char *rp; + + /* We have to execute ourselves, because the libc caches the + * value of $LD_BIND_NOW on initialization. */ + + putenv(pa_xstrdup("LD_BIND_NOW=1")); + pa_assert_se(rp = pa_readlink("/proc/self/exe")); + pa_assert_se(execv(rp, argv) == 0); + } +#endif + setlocale(LC_ALL, ""); pa_log_set_maximal_level(PA_LOG_INFO); pa_log_set_ident("pulseaudio");