Gentoo Archives: gentoo-announce

From: Tim Yamin <plasmaroo@g.o>
To: bugtraq@×××××××××××××.com, full-disclosure@××××××××××××.com, security-alerts@×××××××××××××.com, gentoo-core@l.g.o, gentoo-announce@l.g.o
Subject: [gentoo-announce] [ GLSA 200401-01 ] Linux kernel do_mremap() privelege escalation vulnerability
Date: Fri, 09 Jan 2004 00:03:22
Message-Id: 3FFDECE2.3010707@gentoo.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5 Gentoo Linux Security Advisory GLSA 200401-01
6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
7 ~ http://security.gentoo.org
8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
10 ~ Severity: High
11 ~ Title: Linux kernel do_mremap() privilege escalation vulnerability
12 ~ Date: January 08, 2004
13 ~ Bugs: #37292, #37317
14 ~ ID: 200401-01
15
16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
17
18 Synopsis
19 ========
20
21 A critical security vulnerability has been found in recent Linux kernels
22 which allows for local privilege escalation.
23
24 Background
25 ==========
26
27 The Linux kernel is responsible for memory management in a working
28 system - to allow this, processes are allowed to allocate and unallocate
29 memory.
30
31 Affected packages
32 =================
33
34 ~ -------------------------------------------------------------------
35 ~ Kernel / Unaffected Version / Manual Update?
36 ~ -------------------------------------------------------------------
37
38 ~ aa-sources................2.4.23-r1...................YES..........
39 ~ alpha-sources.............2.4.21-r2...................YES..........
40 ~ arm-sources...............2.4.19-r2................................
41 ~ ck-sources................2.4.23-r1...................YES..........
42 ~ compaq-sources............2.4.9.32.7-r1............................
43 ~ development-sources.......2.6.1_rc3................................
44 ~ gaming-sources............2.4.20-r7................................
45 ~ gentoo-dev-sources........2.6.1_rc3................................
46 ~ gentoo-sources............2.4.20-r10...............................
47 ~ gentoo-sources............2.4.22-r3................................
48 ~ grsec-sources.............2.4.23.1.9.13-r1.........................
49 ~ grsec-sources.............2.4.23.2.0_rc4-r1........................
50 ~ gs-sources................2.4.23_pre8-r2...........................
51 ~ hardened-sources..........2.4.22-r2................................
52 ~ hppa-sources..............2.4.23_p4-r2...........................
53 ~ ia64-sources..............2.4.22-r2................................
54 ~ mips-prepatch-sources.....2.4.24_pre2-r1...........................
55 ~ mips-sources..............2.4.23-r2................................
56 ~ mm-sources................2.6.1_rc1-r2................YES..........
57 ~ openmosix-sources.........2.4.22-r3................................
58 ~ pac-sources...............2.4.23-r1................................
59 ~ pfeifer-sources...........2.4.21.1_pre4-r1.........................
60 ~ planet-ccrma-sources......2.4.21-r4................................
61 ~ ppc-development-sources...2.6.1_rc1-r1................YES..........
62 ~ ppc-sources...............2.4.23-r1................................
63 ~ ppc-sources-benh..........2.4.22-r4................................
64 ~ ppc-sources-crypto........2.4.20-r2................................
65 ~ ppc-sources-dev...........2.4.22-r1................................
66 ~ selinux-sources...........2.4.24...................................
67 ~ sparc-dev-sources.........2.6.1_rc2................................
68 ~ sparc-sources.............2.4.24...................................
69 ~ usermode-sources..........2.4.23-r1................................
70 ~ vanilla-prepatch-sources..2.4.25_pre4..............................
71 ~ vanilla-sources...........2.4.24...................................
72 ~ win4lin-sources...........2.6.0-r1.................................
73 ~ wolk-sources..............4.9-r3...................................
74 ~ wolk-sources..............4.10_pre7-r2.............................
75 ~ xfs-sources...............2.4.23-r1................................
76
77 ~ IMPORTANT: IF YOUR KERNEL IS MARKED AS "YES" ABOVE, THEN YOU SHOULD
78 ~ UPDATE YOUR KERNEL EVEN IF PORTAGE REPORTS THAT THE SAME
79 ~ VERSION IS INSTALLED.
80
81 Description
82 ===========
83
84 The memory subsystem allows for shrinking, growing, and moving of chunks
85 of memory along any of the allocated memory areas which the kernel
86 possesses.
87
88 A typical virtual memory area covers at least one memory page. An
89 incorrect bound check discovered inside the do_mremap() kernel code
90 performing remapping of a virtual memory area may lead to creation of a
91 virtual memory area of 0 bytes length.
92
93 The problem is based on the general mremap flaw that remapping 2 pages
94 from inside a VMA creates a memory hole of only one page in length but
95 an additional VMA of two pages. In the case of a zero sized remapping
96 request no VMA hole is created but an additional VMA descriptor of 0
97 bytes in length is created.
98
99 This advisory also addresses an information leak in the Linux RTC system.
100
101 Impact
102 ======
103
104 Arbitrary code may be able to exploit this vulnerability and may disrupt
105 the operation of other parts of the kernel memory management subroutines
106 finally leading to unexpected behavior.
107
108 Since no special privileges are required to use the mremap() system call
109 any process may misuse its unexpected behavior to disrupt the kernel
110 memory management subsystem. Proper exploitation of this vulnerability
111 may lead to local privilege escalation including execution of arbitrary
112 code with kernel level access.
113
114 Proof-of-concept exploit code [ 1 ] has been created and successfully
115 tested, permitting root escalation on vulnerable systems. As a result,
116 all users should upgrade their kernels to new or patched versions.
117
118 Workaround
119 ==========
120
121 There is no temporary workaround - a kernel upgrade is required. A list
122 of unaffected kernels is provided along with this announcement.
123
124 Resolution
125 ==========
126
127 Users are encouraged to upgrade to the latest available sources for
128 their system:
129
130 ~ $> emerge sync
131 ~ $> emerge -pv your-favorite-sources
132
133 ~ $> # IMPORTANT: IF YOUR KERNEL IS MARKED AS "Manual Update" THEN
134 ~ $> # THE PORTAGE MAY REPORT THAT YOU HAVE THE SAME KERNEL ON
135 ~ $> # YOUR SYSTEM. YOU SHOULD STILL UPDATE YOUR KERNEL!
136
137 ~ $> emerge your-favorite-sources
138
139 ~ $> # Follow usual procedures for compiling and installing a kernel.
140 ~ $> # If you use genkernel, run genkernel as you would do normally.
141
142 ~ $> # See http://www.gentoo.org/doc/en/handbook/handbook.xml for help.
143
144 References
145 ==========
146
147 ~ [ 1 ] : http://isec.pl/vulnerabilities/isec-0012-mremap.txt
148
149 Concerns?
150 =========
151
152 Security is a primary focus of Gentoo Linux and ensuring the
153 confidentiality and security of our users machines is of utmost
154 importance to us. Any security concerns should be addressed to
155 security@g.o or alternatively, you may file a bug at
156 http://bugs.gentoo.org.
157 -----BEGIN PGP SIGNATURE-----
158 Version: GnuPG v1.2.1 (GNU/Linux)
159 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
160
161 iD8DBQE//ey7MMXbAy2b2EIRApZ9AJ41petnagS22sfVRAp+WtR4uv78OgCcD3SS
162 4cLZsNOvhgOmkUOeE54oog8=
163 =to9V
164 -----END PGP SIGNATURE-----