Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Another root exploit in 2.2, 2.4 and 2.6?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gruffi
Apprentice
Apprentice


Joined: 15 Aug 2003
Posts: 209
Location: Antwerpen - Flanders - Belgium

PostPosted: Mon Jan 05, 2004 1:52 pm    Post subject: Another root exploit in 2.2, 2.4 and 2.6? Reply with quote

http://isec.pl/vulnerabilities/isec-0012-mremap.txt
Quote:

Since no special privileges are required to use the mremap(2) system call any process may misuse its unexpected behavior to disrupt the kernel memory management subsystem. Proper exploitation of this vulnerability may lead to local privilege escalation including execution of arbitrary code with kernel level access. Proof-of-concept exploit code has been created and successfully tested giving UID 0 shell on vulnerable systems.

_________________
... and we will show Microsoft, that they cannot take whatever they want. And that Free Software is our software!
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Mon Jan 05, 2004 2:30 pm    Post subject: Reply with quote

Any gentoo kernels protected?
Back to top
View user's profile Send private message
Kid Hash
n00b
n00b


Joined: 04 Jan 2004
Posts: 31

PostPosted: Mon Jan 05, 2004 6:49 pm    Post subject: Reply with quote

I was wondering this too
I compiled my 2.4.23_pre8-gss yesterday - are any gentoo kernels not vulnerable?
Back to top
View user's profile Send private message
dbergst
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 88

PostPosted: Mon Jan 05, 2004 8:47 pm    Post subject: This is only fixed as of now in kernel 2.4.24 Reply with quote

Kid Hash wrote:
I was wondering this too
I compiled my 2.4.23_pre8-gss yesterday - are any gentoo kernels not vulnerable?


See notes in kernel change log, patches to fix this vulterability are not yet in portage AFAIK.

http://www.tux.org/pub/kernel/v2.4/ChangeLog-2.4.24

Someone should be able to generate comparable patch sets, these would be against several files that reference the rtc. Here is the current set ot patches for 2.4.24 posted at tux.org:

http://www.tux.org/pub/kernel/v2.4/patch-2.4.24.bz2

Detached GPG signature for 2.4.24 patches:

http://www.tux.org/pub/kernel/v2.4/patch-2.4.4.bz2.sign
Back to top
View user's profile Send private message
pphisch
n00b
n00b


Joined: 20 Apr 2003
Posts: 4
Location: Germany

PostPosted: Mon Jan 05, 2004 10:31 pm    Post subject: Reply with quote

i just read this on the gentoo-security mailinglist:

Quote:
On Monday 05 January 2004 12:09, Tobias Weisserth wrote:
> there is a new kernel vulnerability in the mremap system call. This
> affects all kernels of the 2.2, 2,4 and 2.6 series with the exception of
> 2.4.24. There is some information on this at
> http://isec.pl/vulnerabilities/isec-0013-mremap.txt.
yes, we know, see Bug 37292
> together with that do_brk() bug this is already the second major
> exploitable bug in the gentoo-sources. Will there be a gentoo-sources
> ebuild in Portage with the Gentoo tweaks for the 2.4.24 kernel or is it
> better to migrate to 2.6 immediately?
all kernels in portage should already be patched against do_brk() ...read the ChangeLog
-mike


and in the changelog i found this:
Quote:
*gentoo-sources-2.4.22-r1 (02 Dec 2003)

02 Dec 2003; Brian Jackson <iggy@gentoo.org>
gentoo-sources-2.4.20-r9.ebuild, gentoo-sources-2.4.22-r1.ebuild,
gentoo-sources-2.4.22.ebuild:
Version bump for the recent do_brk() vulnerability.

01 Dec 2003; Brian Jackson <iggy@gentoo.org>
gentoo-sources-2.4.19-r10.ebuild, gentoo-sources-2.4.20-r5.ebuild,
gentoo-sources-2.4.20-r6.ebuild, gentoo-sources-2.4.20-r7.ebuild,
gentoo-sources-2.4.20-r8.ebuild, gentoo-sources-2.4.22.ebuild:
Added a fix for the recent do_brk() vulnerability.


how come, the gentoo developers knew about this vulnerability (or is it a different one?) since december the 1st?
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Mon Jan 05, 2004 10:35 pm    Post subject: Reply with quote

The do_brk bug was an earlier one, that was used to compromise the Debian servers IIRC.
Back to top
View user's profile Send private message
puke
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2002
Posts: 128

PostPosted: Tue Jan 06, 2004 6:10 am    Post subject: Reply with quote

Yes, do_brk is soooo last year. :lol:
Back to top
View user's profile Send private message
pb
n00b
n00b


Joined: 08 Jan 2003
Posts: 6
Location: Kielce, Poland

PostPosted: Tue Jan 06, 2004 6:28 am    Post subject: Reply with quote

Here's a hotfix from Wojtek Kaniewski for <=2.4.23 kernels

Code:

# wget http://toxygen.net/hotfixes/mremap.c
# gcc -Wall -O3 -fomit-frame-pointer -I/usr/src/linux/include -c -o
mremap.o mremap.c
# insmod mremap.o
Back to top
View user's profile Send private message
plate
Bodhisattva
Bodhisattva


Joined: 25 Jul 2002
Posts: 1663
Location: Berlin

PostPosted: Tue Jan 06, 2004 11:26 am    Post subject: Reply with quote

Look at both bug reports (mremap and rtc) for information about fixes to kernel sources in Portage. That's where all the action is until the GLSAs are published...
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Tue Jan 06, 2004 12:19 pm    Post subject: GLSA Reply with quote

Sorry for asking a perhaps dumb question. But where can I read the newest GLSA? The forum is not quite up-to-date. Is there be some dedicated website? Or will I have to subsribe to the security ML?
Back to top
View user's profile Send private message
plate
Bodhisattva
Bodhisattva


Joined: 25 Jul 2002
Posts: 1663
Location: Berlin

PostPosted: Tue Jan 06, 2004 2:49 pm    Post subject: Reply with quote

gentoo-announce is the name of the mailing list. Actually, the Forums are as much up to date on Gentoo Linux Security Announcements as it ever gets. Every time a GLSA gets published it appears on the front page of the Forums, too.
Back to top
View user's profile Send private message
meyerm
Veteran
Veteran


Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

PostPosted: Tue Jan 06, 2004 3:07 pm    Post subject: Reply with quote

Ah, GLSA are published only when a patch is available and already merges into the portage tree?
Back to top
View user's profile Send private message
ddanier
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2002
Posts: 87

PostPosted: Tue Jan 06, 2004 11:49 pm    Post subject: Reply with quote

updated versions of the kernel availible, but no GLSA yet ;)
_________________
My Box said: "Install Win95 or better ..." So I installed Linux.
Back to top
View user's profile Send private message
Endolf
n00b
n00b


Joined: 02 Feb 2003
Posts: 36

PostPosted: Wed Jan 07, 2004 1:04 pm    Post subject: Reply with quote

Hi
They are indeed. But what confuses me is having read the patch and compared my 2.4.22-r2 kernel source it doesn't appear to be in there, but the bug log says thats where they applied it. On the other hand, 2.4.22-r3 does have it, so i'm building that instead :)

Endolf
Back to top
View user's profile Send private message
pb
n00b
n00b


Joined: 08 Jan 2003
Posts: 6
Location: Kielce, Poland

PostPosted: Wed Jan 07, 2004 1:19 pm    Post subject: Reply with quote

Endolf wrote:
Hi
They are indeed. But what confuses me is having read the patch and compared my 2.4.22-r2 kernel source it doesn't appear to be in there, but the bug log says thats where they applied it. On the other hand, 2.4.22-r3 does have it, so i'm building that instead :)

Endolf


gentoo-sources-2.4.22-r3 is the same as 2.4.22-r2... i wonder why it has been released and marked as stable...

Code:

# cd /usr/portage/sys-kernel/gentoo-sources/
# diff gentoo-sources-2.4.22-r2.ebuild gentoo-sources-2.4.22-r3.ebuild
Back to top
View user's profile Send private message
Endolf
n00b
n00b


Joined: 02 Feb 2003
Posts: 36

PostPosted: Wed Jan 07, 2004 1:36 pm    Post subject: Reply with quote

Hi
Mine seem to have some slight difference, i'm not sure what it's supposed to resolve too, but ${PVR} has been replaces with 2.4.22-r2 in the r3 ebuild, i'm *guessing* ${PVR} would resolve to 2.4.22-r3 and the patch files are the r2 ones still. This doesn't explain why my r2 sources don't have the patch though, unless the r2 ebuild has been updated since I got mine (the sync to get r3 would have overwritten the r2 ebuild in this case, so I can't tell)

Endolf
Back to top
View user's profile Send private message
Endolf
n00b
n00b


Joined: 02 Feb 2003
Posts: 36

PostPosted: Wed Jan 07, 2004 1:41 pm    Post subject: Reply with quote

Hmm
Just checked another box that I emerge sync'd 24 hours ago, and it does indeed look like the r2 ebuild changed as the old one doesn't have the RTC or mremap patches in it, where as the one i sync'd today does, I guess that is why I don't have the patches applied to my r2 kernel that I build yesterday afternoon (GMT) :)

Endolf

Edit: A quick copy between boxes and I get this
Code:
diff gentoo-sources-2.4.22-r2.ebuild gentoo-sources-2.4.22-r2.ebuild.new
1c1
< # Copyright 1999-2003 Gentoo Technologies, Inc.
---
> # Copyright 1999-2004 Gentoo Technologies, Inc.
3c3
< # $Header: /home/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild,v 1.2 2003/12/21 06:45:59 iggy Exp $
---
> # $Header: /home/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.22-r2.ebuild,v 1.3 2004/01/06 15:17:52 plasmaroo Exp $
40a41,43
>       epatch ${FILESDIR}/gentoo-sources-2.4.CAN-2003-0985.patch || die "Failed to apply mremap() fix!"
>       epatch ${FILESDIR}/gentoo-sources-2.4.22-rtc_fix.patch || die "Failed to apply RTC fix!"
>

So we now know who to blame for confusing us poor mortals, thats right, plasmaroo is our winner today :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum