Bug 196126
| Summary: | Potential X insecure suid calls | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mike A. Harris <mharris> |
| Component: | xorg-x11 | Assignee: | Mike A. Harris <mharris> |
| Status: | CLOSED ERRATA | QA Contact: | David Lawrence <dkl> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5 | CC: | security-response-team, xgl-maint |
| Target Milestone: | --- | Keywords: | Security |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2006-08-03 14:42:33 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 196094 | ||
| Bug Blocks: | 182226 | ||
|
Description
Mike A. Harris
2006-06-21 11:00:52 UTC
[From bug 195555] Comment #6 From Josh Bressers (Security Response Team) (bressers) on 2006-06-22 14:00 EST [reply] Private This is not a secuirty issue. It turns out the places that the setuid is used are not controlable by an attacker. The upstream advisory mentions unchecked suid usage in several places. We only ship the Xorg executable suid root, which is the only potentially vulnerable program. Here is a listing of the bad setuid() calls (provided by Marcus Meissner of Suse). The analysis was done by me. ./programs/Xserver/hw/xfree86/common/xf86Init.c: setuid(getuid()); After this "sh -c "vtinit"" is called, which might be exploitable. We don't enable the vtinit command by default, nor would I expect anybody to be using this configuration option. Even if this ran as root it will rely on a very insecure and poor configuration file option. ./programs/Xserver/hw/xfree86/parser/write.c: setuid(getuid()); Could corrupt any file on the system, like /etc/shadow. Only when Xorg is run as root can this codepath be reached; the setuid is a bit silly. ./programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c: setuid(getuid()); In xf86execl(), which I do not know who calls it. (There are #define execl xf86execl in some files.) All calls to execl (that are dangerous) are preceded by a setuid call. They are the xf86Init.c call above, and the utils.c calls below. ./programs/Xserver/os/utils.c: setuid(getuid()); ./programs/Xserver/os/utils.c: setuid(getuid()); ./programs/Xserver/os/utils.c: setuid(getuid()); These are in Popen(), Fopen(), System(). The calls to Fopen should be safe. The server uses seteuid if it's there, otherwise it will fall back on setuid. (seteuid() is not vulnerable to this problem) The calls to Popen and System are used by the keyboard map loading bits of X. There is no way for a user to specify a keyboard file (There is a -kkbdb option which does nothing). I can specify an existing keyboard map (-kbmap), but the keymap file is verified and loaded long before the suid call happens. Here is the list of package which have been updated and/or rebuilt for FC5 to pick up the setuid bugfixes: xorg-x11-xtrans-devel-1.0.0-3.2.FC5.0 libX11-1.0.0-3.FC5.0 xorg-x11-server-1.0.1-9.FC5.4 xorg-x11-xdm-1.0.1-2 xorg-x11-xfs-1.0.1-4.FC5.0 xorg-x11-xinit-1.0.1-2.FC5.0 xorg-x11-apps-7.0-1 These will be released as an aggregated bugfix release for FC5. While this issue was originally filed as a potential security issue, a close analysis of the code in question by the Red Hat security team seem to indicate that it is not vulnerable to attack, and as such the issue has been downgraded from "security" to "bugfix" severity. xorg-x11-xtrans-devel-1.0.0-3.2.FC5.0 libX11-1.0.0-3.FC5.0 xorg-x11-server-1.0.1-9.FC5.4 xorg-x11-xdm-1.0.1-2 xorg-x11-xfs-1.0.1-4.FC5.0 xorg-x11-xinit-1.0.1-2.FC5.0 xorg-x11-apps-7.0-1 has been pushed for fc5, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report. xorg-x11-xtrans-devel-1.0.0-3.2.FC5.0 libX11-1.0.0-3.FC5.0 xorg-x11-server-1.0.1-9.FC5.4 xorg-x11-xdm-1.0.1-2 xorg-x11-xfs-1.0.1-4.FC5.0 xorg-x11-xinit-1.0.1-2.FC5.0 xorg-x11-apps-7.0-1 has been pushed for fc5, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report. |