Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
do_mremap() - Patch?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
sprittwicht
l33t
l33t


Joined: 04 Dec 2003
Posts: 644

PostPosted: Wed Jan 07, 2004 12:46 pm    Post subject: do_mremap() - Patch? Reply with quote

Hallo. Ich wollte mal fragen, ob in den aktuellen gentoo-sources-2.4.22-r3 schon ein Patch gegen die aktuelle Sicherheitslücke in der do_mremap() - Funktion enthalten ist?
Hab die neue mremap.c mit der mremap.c.orig verglichen und bin jetzt mal wieder etwas durcheinander:
Hinzugekommen ist folgende Abfrage:

Code:
if (!(old_len | new_len))
  goto out;


Erfüllt das seinen Zweck oder ist das noch was ganz anderes?
Hab nämlich folgenden Patch durch diverse Foren geistern sehen:

Code:
if (unlikely(!new_len && new_addr != addr))
  goto out;


...und der tut ja anscheinend was ziemlich anderes, oder ist meine Gabe, C-Quellcode zu lesen, so schwach ausgeprägt? :-)

Ich seh nicht so recht den Sinn im Gentoo-Code. Er springt doch nur raus, wenn old_len UND new_len 0 sind, wozu die old_len-Abfrage?
Back to top
View user's profile Send private message
sirro
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1472
Location: aachen.nrw.de.eu

PostPosted: Wed Jan 07, 2004 12:56 pm    Post subject: Reply with quote

/usr/portage/sys-kernel/gentoo-sources/ChangeLog wrote:

*gentoo-sources-2.4.22-r3 (06 Jan 2004)
*gentoo-sources-2.4.20-r10 (06 Jan 2004)

06 Jan 2004; <plasmaroo@gentoo.org> gentoo-sources-2.4.22-r3.ebuild:
gentoo-sources-2.4.20-r10.ebuild, gentoo-sources-2.4.22-r2.ebuild,
files/gentoo-sources-2.4.20-hpt372.patch,
files/gentoo-sources-2.4.20-rtc_fix.patch,
files/gentoo-sources-2.4.22-rtc_fix.patch,
files/gentoo-sources-2.4.CAN-2003-0985.patch:
Version bump - addresses the security vulnerabilities in bugs #37292 and
#37317.
2.4.20-r10 also includes the patch for HPT372/HPT374 controllers
from bug #20986.


plasmaroo [1] wrote:
Fixed in gentoo-sources-2.4.22-r2.ebuild and gentoo-sources-2.4.20-r10.ebuild.


EDIT: Beide Patches funktionieren gleichermaßen. Zumindest mit einem Exploit [2], das ich mal ausprobiert habe.

[1] https://bugs.gentoo.org/show_bug.cgi?id=37292#c17
[2] http://linuxfromscratch.org/~devine/mremap_poc.c
Back to top
View user's profile Send private message
sprittwicht
l33t
l33t


Joined: 04 Dec 2003
Posts: 644

PostPosted: Thu Jan 08, 2004 1:41 pm    Post subject: Reply with quote

Ich lag wohl doch nicht so ganz falsch, der aktuelle Patch war Mist!
Statt
Code:
if (!(old_len | new_len))

muss es so aussehen:
Code:
if (!old_len || !new_len)


Zitat http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.1-rc3:
Quote:
<torvalds@home.osdl.org>
Fix silly mremap test.

Get off the drugs, Linus.


Ich hoffe das war's dann jetzt, jeden Tag den Kernel neu bauen nervt irgendwann... :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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