Linux kernel do_mremap allows elevated privileges
| linux-domremap-gain-privileges (14135) |
Description:
Linux kernel could allow a local attacker to gain elevated privileges, caused by improper bounds checking of the memory management code that performs the remapping of a virtual memory area in the do_mremap function. A local attacker could create a malicious VMA to exploit this vulnerability and execute arbitrary code on the vulnerable system with privileges of the kernel process.
Platforms Affected:
- Conectiva, Linux 8.0
- Conectiva, Linux 9.0
- Debian, Debian Linux 3.0
- EngardeLinux, Secure Community 2.0
- EngardeLinux, Secure Professional 1.5
- FedoraProject, Fedora Core 1
- Gentoo, Linux
- Immunix, Immunix OS 7.3
- Linux, Kernel 2.4.0 test1
- Linux, Kernel 2.4.0 test8
- Linux, Kernel 2.4.0 test7
- Linux, Kernel 2.4.0 test6
- Linux, Kernel 2.4.0 test5
- Linux, Kernel 2.4.0 test4
- Linux, Kernel 2.4.0 test3
- Linux, Kernel 2.4.0 test2
- Linux, Kernel 2.4.0 test12
- Linux, Kernel 2.4.0
- Linux, Kernel 2.4.0 test9
- Linux, Kernel 2.4.0 test10
- Linux, Kernel 2.4.0 test11
- Linux, Kernel 2.4.1
- Linux, Kernel 2.4.10
- Linux, Kernel 2.4.11
- Linux, Kernel 2.4.12
- Linux, Kernel 2.4.13
- Linux, Kernel 2.4.14
- Linux, Kernel 2.4.15
- Linux, Kernel 2.4.16
- Linux, Kernel 2.4.17
- Linux, Kernel 2.4.18
- Linux, Kernel 2.4.18 x86
- Linux, Kernel 2.4.18 pre8
- Linux, Kernel 2.4.18 pre7
- Linux, Kernel 2.4.18 pre6
- Linux, Kernel 2.4.18 pre5
- Linux, Kernel 2.4.18 pre4
- Linux, Kernel 2.4.18 pre3
- Linux, Kernel 2.4.18 pre2
- Linux, Kernel 2.4.18 pre1
- Linux, Kernel 2.4.19 pre1
- Linux, Kernel 2.4.19 pre2
- Linux, Kernel 2.4.19
- Linux, Kernel 2.4.19 pre6
- Linux, Kernel 2.4.19 pre5
- Linux, Kernel 2.4.19 pre4
- Linux, Kernel 2.4.19 pre3
- Linux, Kernel 2.4.2
- Linux, Kernel 2.4.20
- Linux, Kernel 2.4.21 pre4
- Linux, Kernel 2.4.21 pre7
- Linux, Kernel 2.4.21 pre1
- Linux, Kernel 2.4.21
- Linux, Kernel 2.4.22
- Linux, Kernel 2.4.23
- Linux, Kernel 2.4.3
- Linux, Kernel 2.4.4
- Linux, Kernel 2.4.5
- Linux, Kernel 2.4.6
- Linux, Kernel 2.4.7
- Linux, Kernel 2.4.8
- Linux, Kernel 2.4.9
- MandrakeSoft, Mandrake Linux 9.0
- MandrakeSoft, Mandrake Linux 9.1
- MandrakeSoft, Mandrake Linux 9.1 PPC
- MandrakeSoft, Mandrake Linux 9.2
- MandrakeSoft, Mandrake Linux 9.2 AMD64
- MandrakeSoft, Mandrake Linux Corporate Server 2.1 X86_64
- MandrakeSoft, Mandrake Linux Corporate Server 2.1
- MandrakeSoft, Mandrake Multi Network Firewall 8.2
- RedHat, Enterprise Linux 2.1 AS
- RedHat, Enterprise Linux 2.1 ES
- RedHat, Enterprise Linux 2.1 WS
- RedHat, Enterprise Linux 2.1 AW
- RedHat, Enterprise Linux 3 WS
- RedHat, Enterprise Linux 3 ES
- RedHat, Enterprise Linux 3 AS
- RedHat, Linux 7.1
- RedHat, Linux 7.2
- RedHat, Linux 7.3
- RedHat, Linux 8.0
- RedHat, Linux 9.0
- RedHat, Linux Advanced Workstation 2.1 Itanium
- SGI, IRIX 2.3
- Slackware, Slackware Linux 9.0
- Slackware, Slackware Linux 9.1
- Slackware, Slackware Linux current
- SmoothWall, SmoothWall Express 2.0
- SuSE, SuSE eMail Server 3.1
- SuSE, SuSE eMail Server III
- SuSE, SuSE Linux 8.0
- SuSE, SuSE Linux 8.1
- SuSE, SuSE Linux 8.2
- SuSE, SuSE Linux 9.0
- SuSE, SuSE Linux Database Server
- SuSE, SuSE Linux Desktop 1.0
- SuSE, SuSE Linux Enterprise Server 7.0
- SuSE, SuSE Linux Enterprise Server 8.0
- SuSE, SuSE Linux Firewall
- SuSE, SuSE Linux Office Server
- SuSE, SuSE Linux School Server
- Trustix, Secure Linux 2.0
- Turbolinux, Turbolinux 10 Desktop
- Turbolinux, Turbolinux 7 Server
- Turbolinux, Turbolinux 7 Workstation
- Turbolinux, Turbolinux 8 Server
- Turbolinux, Turbolinux 8 Workstation
Remedy:
For Red Hat Linux:
Upgrade to the latest kernel package, as listed below. Refer to RHSA-2003:417-08 for more information. See References.
Red Hat 7.1, 7.2, and 7.3: 2.4.20-28.7 or later
Red Hat 8.0: 2.4.20-28.8 or later
Red Hat 9: 2.4.20-28.9 or later
For Red Hat Linux containing the kernel package:
Upgrade to the latest kernel package, as listed below. Refer to RHSA-2003:418-04 for more information. See References.
Red Hat Linux Advanced Workstation 2.1 for the Itanium Processor: 2.4.18-e.41 or later
For Red Hat Linux containing the kernel package:
Upgrade to the latest kernel package, as listed below. Refer to RHSA-2003:419-06 for more information. See References.
Red Hat Enterprise Linux AS (v. 2.1), ES (v. 2.1), and WS (v. 2.1): 2.4.9-e.35 or later
For Conectiva Linux:
Upgrade to the latest kernel package, as listed below. Refer to Conectiva Linux Security Announcement CLSA-2004:799 for more information. See References.
Conectiva Linux 8: 2.4.19-1U80_20cl or later
Conectiva Linux 9: 2.4.21-31301U90_13cl or later
For Trustix Secure Linux 2.0:
Upgrade to the latest kernel package (2.4.23-3tr or later), as listed in Trustix Secure Linux Security Advisory #2004-0001. See References.
For EnGarde Secure Linux Community Edition and Professional Edition:
Apply the update for this vulnerability, as listed in Guardian Digital Security Advisory ESA-20040105-001. See References.
For SuSE Linux:
Upgrade to the latest kernel package, as listed below. Refer to SuSE Security Announcement SuSE-SA:2004:001 for more information. See References.
SuSE Linux 9.0 (Intel): 2.4.20 or later
SuSE Linux 8.0 and 8.1: 2.4.18 or later
SuSE Linux 9.0 (x86_64): 2.4.21-17 or later
For Fedora Core:
Upgrade to the latest kernel package, as listed below. Refer to Fedora Security Update Notification FEDORA-2003-046 for more information. See References.
Fedora Core 1: 2.4.22-1.2138 or later
For Immunix OS 7.3:
Upgrade to the latest version of kernel (2.4.20-20_imnx_11 or later), as listed in Immunix OS Security Advisory IMNX-2004-73-001-01. See References.
For Turbolinux:
Upgrade to the latest kernel package, as listed below. Refer to Turbolinux Security Advisory TLSA-2004-1 for more information. See References.
Turbolinux 10 Desktop: 2.6.0-1 or later
Turbolinux 8 Server, 8 Workstation, 7 Server, and 7 Workstation: 2.4.18-16 or later
For Debian GNU/Linux 3.0 (woody):
Upgrade to the latest kernel package (2.4.18-14.1, 2.4.18-1alpha_2.4.18-12 or 2.4.18_2.4.18-1woody3 or later), as listed in DSA-417-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the kernel-image-2.4.17-ia64 package:
Upgrade to the latest kernel-image-2.4.17-ia64 package (011226.15 or later), as listed in DSA-423-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the kernel-image-2.4.17 package:
Upgrade to the latest kernel-image-2.4.17 package (2.4.17-0.020226.2.woody3 or later), as listed in DSA-427-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the linux-kernel-2.4.17-s390 package:
Upgrade to the latest kernel package (0.0.20020816-0.woody.2 or later), as listed in DSA-442-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the powerpc-apus-2.4.17 package:
Upgrade to the latest kernel package (2.4.17-4 or later), as listed in DSA-440-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the arm-2.4.17 package:
Upgrade to the latest kernel package (2.4.16-20040204 or later), as listed in DSA-439-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the mips-2.4.17 package:
Upgrade to the latest kernel package (2.4.19-4.woody1 or later), as listed in DSA-450-1. See References.
For Debian GNU/Linux 3.0 (woody) containing the hppa package:
Upgrade to the latest kernel package, as listed below. Refer to DSA-475-1 for more information. See References.
Debian GNU/Linux 3.0: 2.4.18-hppa or later
For Slackware Linux:
Upgrade to the latest kernel package, as listed below. Refer to slackware-security Mailing List, Tue, 6 Jan 2004 20:00:02 -0800 (PST) for more information. See References.
Slackware Linux 9.0: 2.4.21-i486-3 or later
Slackware Linux 9.1 and -current: 2.4.24-i486-1 or later
For Mandrake Linux:
Upgrade to the latest kernel package, as listed below. Refer to MandrakeSoft Security Advisory MDKSA-2004:001 : kernel for more information. See References.
Mandrake Linux 9.0 and Multi Network Firewall 8.2: 2.4.19.37mdk-1-1mdk or later
Mandrake Linux 9.1: 2.4.21.0.27mdk-1-1mdk or later
Mandrake Linux 9.2: 2.4.22.26mdk-1-1mdk or later
Mandrake Linux Coporate Server 2.1: 2.4.19.34mdk-1-1mdk or later
For SmoothWall Express 2.0:
Apply the SmoothWall Express 2.0 fixes1 patch, as listed in SmoothWall Project Security Advisory SWP-2004:001. See References.
For SGI IRIX:
Apply the 10042 patch for this vulnerability, as listed in SGI Security Advisory 20040102-01-U. See References.
For Gentoo Linux:
Upgrade to the latest package, as listed in GLSA 200402-06. See References.
For Gentoo Linux:
Upgrade to the appropriate package of kernel, as listed in GLSA 200403-02. See References.
For other distributions:
Contact your vendor for upgrade or patch information.
Consequences:
Gain Privileges
References:
- BugTraq Mailing List, Thu Jan 15 2004 - 09:38:33 CST, Linux kernel mremap() bug update at http://archives.neohapsis.com/archives/bugtraq/2004-01/0114.html.
- BugTraq Mailing List, Tue Jan 06 2004 - 10:30:35 CST, Linux mremap bug correction at http://archives.neohapsis.com/archives/bugtraq/2004-01/0038.html.
- CIAC Information Bulletin O-045, Red Hat 'mremap()' function Vulnerability at http://www.ciac.org/ciac/bulletins/o-045.shtml.
- CIAC Information Bulletin O-059, Debian Linux-Kernel-2.4.14-ia64 Vulnerabilities at http://www.ciac.org/ciac/bulletins/o-059.shtml.
- CIAC Information Bulletin O-063, Red Hat Elevated Privileges Vulnerability at http://www.ciac.org/ciac/bulletins/o-063.shtml.
- Conectiva Linux Security Announcement CLSA-2004:799, kernel at http://distro.conectiva.com/atualizacoes/index.php?id=a&anuncio=000799.
- Fedora Security Update Notification FEDORA-2003-046, kernel at http://www.linuxsecurity.com/content/view/105626/102/. (From LinuxSecurity archive)
- GLSA 200402-06, Linux kernel AMD64 ptrace vulnerability at http://www.linuxsecurity.com/content/view/105738/104/. (From LinuxSecurity archive)
- Immunix OS Security Advisory IMNX-2004-73-001-01, kernel at http://www.linuxsecurity.com/content/view/105627/105/. (From LinuxSecurity archive)
- SGI Security Advisory 20040102-01-U, SGI ProPack v2.3: Kernel fixes and security update at ftp://patches.sgi.com/support/free/security/advisories/20040102-01-U.asc.
- slackware-security Mailing List, Tue, 6 Jan 2004 20:00:02 -0800 (PST), Kernel security update (SSA:2004-006-01) at http://www.slackware.org/security/viewer.php?l=slackware-security&y=2004&m=slackware-security.757729.
- SmoothWall Project Security Advisory SWP-2004:001, Updates for SmoothWall Express to correct local vulnerabilities in Linux kernel at http://smoothwall.org/security/advisories/SWP-2004.001.html.
- Trustix Secure Linux Security Advisory #2004-0001, kernel at http://www.linuxsecurity.com/content/view/105623/109/. (From LinuxSecurity archive)
- VulnWatch Mailing List, Mon Jan 05 2004 - 06:30:32 CST, Linux kernel mremap vulnerability at http://archives.neohapsis.com/archives/vulnwatch/2004-q1/0005.html.
- VulnWatch Mailing List, Mon Jan 05 2004 - 07:04:50 CST, Re: Linux kernel mremap vulnerability at http://archives.neohapsis.com/archives/vulnwatch/2004-q1/0006.html.
- BID-18177: Linux Kernel MREMAP Local Privilege Escalation Vulnerability
- BID-9356: Linux Kernel do_mremap Function Boundary Condition Vulnerability
- CVE-2003-0985: The mremap system call (do_mremap) in Linux kernel 2.4.x before 2.4.21, and possibly other versions before 2.4.24, does not properly perform bounds checks, which allows local users to cause a denial of service and possibly gain privileges by causing a remapping of a virtual memory area (VMA) to create a zero length VMA, a different vulnerability than CAN-2004-0077.
- DSA-413: linux-kernel-2.4.18 -- missing boundary check
- DSA-417: linux-kernel-2.4.18-powerpc+alpha -- missing boundary check
- DSA-423: linux-kernel-2.4.17-ia64 -- several vulnerabilities
- DSA-427: linux-kernel-2.4.17-mips+mipsel -- missing boundary check
- DSA-439: linux-kernel-2.4.16-arm -- several vulnerabilities
- DSA-440: linux-kernel-2.4.17-powerpc-apus -- several vulnerabilities
- DSA-442: linux-kernel-2.4.17-s390 -- several vulnerabilities
- DSA-450: linux-kernel-2.4.19-mips -- several vulnerabilities
- DSA-470: linux-kernel-2.4.17-hppa -- several vulnerabilities
- DSA-475: linux-kernel-2.4.18-hppa -- several vulnerabilities
- GLSA-200401-01: Linux kernel do_mremap() local privilege escalation vulnerability
- MDKSA-2004:001: Updated kernel packages fix local root vulnerability
- OSVDB ID: 3315: Linux Kernel do_mremap() Privilege Escalation
- RHSA-2003-416: kernel security update
- RHSA-2003-417: Updated kernel resolves security vulnerability
- RHSA-2003-418: kernel security update
- RHSA-2003-419: kernel security update
- SA10532: Linux Kernel "mremap()" Privilege Escalation Vulnerability
- SECTRACK ID: 1009342: (Gentoo Issues Fix) Linux Kernel do_mremap() Fails to Check do_munmap() Return Values, Allowing a Local User to Gain Root Privileges
- SECTRACK ID: 1009629: (Debian Issues Fix for HPPA) Linux Kernel mremap() Improper Bounds Checking Lets Local Users Gain Root Privileges
- SECTRACK ID: 1009637: (VMware Issues Fix) Linux Kernel mremap() Improper Bounds Checking Lets Local Users Gain Root Privileges
- SECTRACK ID: 1009671: (Debian Issues Fix for 2.4.18 HPPA) Linux Kernel mremap() Improper Bounds Checking Lets Local Users Gain Root Privileges
- SUSE-SA:2004:001: Linux Kernel: local system compromise
- SUSE-SA:2004:003: Linux Kernel (x86_64 AMD64): local system compromise
Reported:
Jan 05, 2004
The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Copyright (c) 1994-2008 Internet Security Systems, Inc. All rights reserved worldwide.
For corrections or additions please email xforce@iss.net
