Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 290146 Details for
Bug 425481
CVE-2008-0008 Pulseaudio ignores setuid() return value
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fail when it's not possible to drop root privileges
pulseaudio-0.9.8-droproot.patch (text/plain), 2.94 KB, created by
Lubomir Kundrak
on 2007-12-20 12:40:23 UTC
(
hide
)
Description:
Fail when it's not possible to drop root privileges
Filename:
MIME Type:
Creator:
Lubomir Kundrak
Created:
2007-12-20 12:40:23 UTC
Size:
2.94 KB
patch
obsolete
>Fail when dropping root privileges is not successful. > >https://bugzilla.novell.com/show_bug.cgi?id=347822 >https://bugzilla.redhat.com/show_bug.cgi?id=425481 > >Lubomir Kundrak <lkundrak@redhat.com> > >diff -urp pulseaudio-0.9.8/src/daemon/caps.c pulseaudio-0.9.8.drop/src/daemon/caps.c >--- pulseaudio-0.9.8/src/daemon/caps.c 2007-11-17 00:44:48.000000000 +0100 >+++ pulseaudio-0.9.8.drop/src/daemon/caps.c 2007-12-20 13:19:10.000000000 +0100 >@@ -54,27 +54,36 @@ int setresuid(uid_t r, uid_t e, uid_t s) > #ifdef HAVE_GETUID > > /* Drop root rights when called SUID root */ >-void pa_drop_root(void) { >+int pa_drop_root(void) { > uid_t uid = getuid(); >+ int error = 0; > > if (uid == 0 || geteuid() != 0) >- return; >+ return 0; > > pa_log_info("Dropping root priviliges."); > > #if defined(HAVE_SETRESUID) >- setresuid(uid, uid, uid); >+ error -= setresuid(uid, uid, uid); > #elif defined(HAVE_SETREUID) >- setreuid(uid, uid); >+ error -= setreuid(uid, uid); > #else >- setuid(uid); >- seteuid(uid); >+ error -= setuid(uid); >+ error -= seteuid(uid); > #endif >+ >+ if (error < 0) { >+ pa_log_error("Could not drop root priviliges."); >+ return -1; >+ } >+ >+ return 0; > } > > #else > >-void pa_drop_root(void) { >+int pa_drop_root(void) { >+ return 0; > } > > #endif >@@ -142,8 +151,7 @@ int pa_limit_caps(void) { > } > > int pa_drop_caps(void) { >- pa_drop_root(); >- return 0; >+ return pa_drop_root(); > } > > #endif >diff -urp pulseaudio-0.9.8/src/daemon/caps.h pulseaudio-0.9.8.drop/src/daemon/caps.h >--- pulseaudio-0.9.8/src/daemon/caps.h 2007-11-16 04:20:36.000000000 +0100 >+++ pulseaudio-0.9.8.drop/src/daemon/caps.h 2007-12-20 13:15:46.000000000 +0100 >@@ -24,7 +24,7 @@ > USA. > ***/ > >-void pa_drop_root(void); >+int pa_drop_root(void); > int pa_limit_caps(void); > int pa_drop_caps(void); > >diff -urp pulseaudio-0.9.8/src/daemon/main.c pulseaudio-0.9.8.drop/src/daemon/main.c >--- pulseaudio-0.9.8/src/daemon/main.c 2007-11-21 02:30:42.000000000 +0100 >+++ pulseaudio-0.9.8.drop/src/daemon/main.c 2007-12-20 13:18:53.000000000 +0100 >@@ -372,7 +372,8 @@ int main(int argc, char *argv[]) { > pa_limit_caps(); > > /* Drop priviliges, but keep CAP_SYS_NICE */ >- pa_drop_root(); >+ if (pa_drop_root() < 0) >+ goto finish; > > /* After dropping root, the effective set is reset, hence, > * let's raise it again */ >@@ -443,7 +444,8 @@ int main(int argc, char *argv[]) { > * let's give it up early */ > > pa_drop_caps(); >- pa_drop_root(); >+ if (pa_drop_root() < 0) >+ goto finish; > suid_root = real_root = FALSE; > > if (conf->high_priority || conf->realtime_scheduling) >@@ -497,7 +499,8 @@ int main(int argc, char *argv[]) { > > if (drop) { > pa_drop_caps(); >- pa_drop_root(); >+ if (pa_drop_root() < 0) >+ goto finish; > suid_root = real_root = FALSE; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 425481
:
290146
|
292647