First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 77025
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Thierry Carrez (RETIRED) <koon@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
2.6.10-mm1-brk-locked.patch 2.6.10-mm1-brk-locked.patch patch Thierry Carrez (RETIRED) 2005-01-07 07:24 0000 7.06 KB Details | Diff
2.6.10-mm1-brk-locked-plasmaroo.patch 2.6 Patch patch Tim Yamin (RETIRED) 2005-01-07 09:29 0000 9.51 KB Details | Diff
2.4-brk-locked-plasmaroo.patch 2.4 Patch patch Tim Yamin (RETIRED) 2005-01-07 12:43 0000 8.08 KB Details | Diff
2.4-brk-locked-plasmaroo.patch 2.4 Patch (Use if kernel does not have PaX) patch Tim Yamin (RETIRED) 2005-01-08 10:24 0000 8.01 KB Details | Diff
2.4-brk-locked-plasmaroo.PaX.patch 2.4 Patch (Use if kernel does have PaX) patch Tim Yamin (RETIRED) 2005-01-08 10:26 0000 8.70 KB Details | Diff
2.4.27-brk-locked-plasmaroo.patch <= 2.4.27 Patch (No PaX) patch Tim Yamin (RETIRED) 2005-01-08 13:55 0000 8.32 KB Details | Diff
2.4.27-brk-locked-plasmaroo.PaX.patch <= 2.4.27 Patch (PaX) patch Tim Yamin (RETIRED) 2005-01-08 13:56 0000 8.65 KB Details | Diff
2.6.7-brk-locked.plasmaroo.patch 2.6.7 Patch patch Tim Yamin (RETIRED) 2005-01-09 03:26 0000 10.68 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 77025 depends on: Show dependency tree
Bug 77025 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-01-07 07:16 0000
It's public now :

===================================================================
Synopsis:  Linux kernel uselib() privilege elevation
Product:   Linux kernel
Version:   2.4 up to and including 2.4.29-rc2, 2.6 up to and including 2.6.10
Vendor:    http://www.kernel.org/
URL:       http://isec.pl/vulnerabilities/isec-0021-uselib.txt
CVE:       CAN-2004-1235
Author:    Paul Starzetz <ihaquer@isec.pl>
Date:      Jan 07, 2005

Issue:
======

Locally  exploitable  flaws  have  been found in the Linux binary format
loaders'  uselib()  functions  that  allow  local  users  to  gain  root
privileges.


Details:
========

The Linux kernel provides a binary format loader layer to load (execute)
programs of different binary formats like ELF or  a.out  and  more.  The
kernel   also   provides   a  function  named  sys_uselib()  to  load  a
corresponding library.  This  function  is  dispatched  to  the  current
process's  binary  format  handler  and is basically a simplified mmap()
coupled with some header parsing code.

An analyze of the uselib function load_elf_library()  from  binfmt_elf.c
revealed a flaw in the handling of the library's brk segment (VMA). That
segment is created with the  current->mm->mmap_sem  semaphore  NOT  held
while  modifying  the  memory layout of the calling process. This can be
used to disturb the memory management and gain elevated privileges. Also
the binfmt_aout binary format loader code is affected in the same way.
=======================================================================

------- Comment #1 From Thierry Carrez (RETIRED) 2005-01-07 07:24:06 0000 -------
Created an attachment (id=47851) [edit]
2.6.10-mm1-brk-locked.patch

Patch from Marcelo Tossati.
He said it was not very tested.

------- Comment #2 From Thierry Carrez (RETIRED) 2005-01-07 07:24:41 0000 -------
2.4 patch at http://linux.bkbits.net:8080/linux-2.4/patch@1.1551

------- Comment #3 From Thierry Carrez (RETIRED) 2005-01-07 07:45:49 0000 -------
*** Bug 76292 has been marked as a duplicate of this bug. ***

------- Comment #4 From Tim Yamin (RETIRED) 2005-01-07 09:29:35 0000 -------
Created an attachment (id=47865) [edit]
2.6 Patch

------- Comment #5 From Christian Birchinger 2005-01-07 09:50:04 0000 -------
The linked 2.4 patch doesn't apply here. Does it depend on another patch which
i missed?

No other patch in 2.4.28 here seems to touch the failing binfmt_elf.c

vma patch is only for binfmt_elf32.c and the binfmt_a.out patch is for
binfmt_aout.c

so binfmt_elf.c seems to be vanilla here and the patch still fails.

I also did a generic grep "binfmt_elf.c" on all patches ... none touches that
file.

------- Comment #6 From Tim Yamin (RETIRED) 2005-01-07 12:43:50 0000 -------
Created an attachment (id=47891) [edit]
2.4 Patch

------- Comment #7 From Niels Laukens 2005-01-08 01:39:48 0000 -------
Just to note, there is also a forum topic about this:
http://forums.gentoo.org/viewtopic.php?t=276357

quotes:
* 2.6.10-gentoo-dev-sources-r3 has the fix for this vulnerability.
* The grsec team has posted a set of cummulative patches that
should fix this as far as I can tell. http://www.grsecurity.net/download.php

What about the hardened{,-dev}-sources?

------- Comment #8 From Christian Birchinger 2005-01-08 03:41:34 0000 -------
Fixed in sparc-sources-2.4.28-r4

------- Comment #9 From Tim Yamin (RETIRED) 2005-01-08 10:24:21 0000 -------
Created an attachment (id=47953) [edit]
2.4 Patch (Use if kernel does not have PaX)

------- Comment #10 From Tim Yamin (RETIRED) 2005-01-08 10:26:47 0000 -------
Created an attachment (id=47955) [edit]
2.4 Patch (Use if kernel does have PaX)

------- Comment #11 From solar 2005-01-08 12:27:34 0000 -------
grsec-sources patched with the attachment #47955 [edit]. -* masked while testing and
getting gradm pkg together. 

------- Comment #12 From Tim Yamin (RETIRED) 2005-01-08 13:55:56 0000 -------
Created an attachment (id=47970) [edit]
<= 2.4.27 Patch (No PaX)

------- Comment #13 From Tim Yamin (RETIRED) 2005-01-08 13:56:18 0000 -------
Created an attachment (id=47971) [edit]
<= 2.4.27 Patch (PaX)

------- Comment #14 From Tony Vroon 2005-01-08 16:56:43 0000 -------
Security bump; development-sources 2.6.10-r1, arches please mark stable.

------- Comment #15 From Tim Yamin (RETIRED) 2005-01-09 03:26:54 0000 -------
Created an attachment (id=48007) [edit]
2.6.7 Patch

------- Comment #16 From Tom Martin (RETIRED) 2005-01-09 05:28:32 0000 -------
2.6.10-r1 stable on amd64, thanks.

------- Comment #17 From Daniel Drake 2005-01-09 08:33:12 0000 -------
gentoo-dev-sources done

------- Comment #18 From Tim Yamin (RETIRED) 2005-01-09 13:31:32 0000 -------
All done, following externally maintained sources still need fixing:

hardened-(dev-)sources -- Adding hardened herd...
hppa-sources -- Adding GMSoft...
mips-sources -- Adding Kumba...
openmosix-sources -- Adding cluster herd...
pegasos-dev-sources -- Adding dholm...
rsbac-(dev-)sources -- Adding kang...
sparc-sources -- Adding Joker (Update with attachment #47953 [edit])...

------- Comment #19 From David Holm (RETIRED) 2005-01-09 13:36:18 0000 -------
pegasos-dev-sources has already been fixed

------- Comment #20 From Christian Birchinger 2005-01-09 13:45:27 0000 -------
patch updated on sparc

------- Comment #21 From Guy Martin 2005-01-10 09:46:22 0000 -------
Done in hppa-sources-2.6.10_p10.

------- Comment #22 From Konstantin Arkhipov 2005-01-10 09:52:57 0000 -------
done for openMo6-sources.

------- Comment #23 From Adam Mondl (RETIRED) 2005-01-11 20:45:32 0000 -------
~x86 hardened-dev-sources-2.6.10 patched

------- Comment #24 From Tony Vroon 2005-01-12 12:45:46 0000 -------
Development-sources now done. Vulnerable ebuilds purged.

------- Comment #25 From Guillaume Destuynder (RETIRED) 2005-01-13 15:55:27 0000 -------
rsbac-sources 2.6 tree patched

------- Comment #26 From Adam Mondl (RETIRED) 2005-01-13 19:13:39 0000 -------
~x86 hardened-sources-2.4.28-r2 fixed

------- Comment #27 From Daniel Drake 2005-01-17 07:27:44 0000 -------
gentoo-dev-sources is done

------- Comment #28 From Joshua Kinard 2005-01-18 19:00:37 0000 -------
mips-sources patched

------- Comment #29 From Guillaume Destuynder (RETIRED) 2005-01-21 05:35:20 0000 -------
rsbac-sources 2.4 is also fixed in ~x86

------- Comment #30 From Thierry Carrez (RETIRED) 2005-03-16 03:16:25 0000 -------
Mass-Ccing kern-sec@gentoo.org to make sure Kernel Security guys know about all
of these...

------- Comment #31 From Tim Yamin (RETIRED) 2005-03-29 05:44:19 0000 -------
All fixed, closing bug.

First Last Prev Next    No search results available      Search page      Enter new bug