Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157186 - Kernel: remote memory corruptor in ibmtr.c (CVE-2006-6333)
Summary: Kernel: remote memory corruptor in ibmtr.c (CVE-2006-6333)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard: [linux <2.6.19.1]
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-05 01:18 UTC by Sune Kloppenborg Jeppesen (RETIRED)
Modified: 2009-07-11 10:16 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
the upstream patch that went into git13 (ibmtr.c.patch,27.95 KB, patch)
2006-12-08 19:20 UTC, Harlan Lieberman-Berg (RETIRED)
no flags Details | Diff
The RIGHT patch (bugzie! :( ) (ibmtr.c.patch,635 bytes, patch)
2006-12-08 19:40 UTC, Harlan Lieberman-Berg (RETIRED)
no flags Details | Diff
OK... this is really annoying. (ibmtr.patch,1.04 KB, patch)
2006-12-08 19:43 UTC, Harlan Lieberman-Berg (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-12-05 01:18:20 UTC
[PATCH] remote memory corruptor in ibmtr.c
 
 ip_summed changes last summer had missed that one.  As the result,
 we have ip_summed interpreted as CHECKSUM_PARTIAL now.  IOW,
 ->csum is interpreted as offset of checksum in the packet.  net/core/*
 will both read and modify the value as that offset, with obvious
 reasons.  At the very least it's a remote memory corruptor.
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Comment 1 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:20:03 UTC
Created attachment 103651 [details, diff]
the upstream patch that went into git13
Comment 2 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:21:02 UTC
Alright, kernels:

cell-sources
ck-sources
gentoo-sources
hardened-sources
hppa-sources
mips-sources
openvz-sources
rsbac-sources
sparc-sources
suspend2-sources
systrace-sources
usermode-sources
vserver-sources
xen-sources

All of you, apply the patch! :P
Comment 3 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:38:39 UTC
Comment on attachment 103651 [details, diff]
the upstream patch that went into git13

--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -1826,7 +1826,7 @@ static void tr_rx(struct net_device *dev
                                        skb->protocol = tr_type_trans(skb, dev);
                                        if (IPv4_p) {
                                          skb->csum = chksum;
                                          -skb->ip_summed = 1;
                                          +skb->ip_summed = CHECKSUM_COMPLETE;
                                        }
                                        netif_rx(skb);
                                        dev->last_rx = jiffies;
Comment 4 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:40:07 UTC
Created attachment 103653 [details, diff]
The RIGHT patch (bugzie! :( )
Comment 5 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:43:07 UTC
Created attachment 103655 [details, diff]
OK... this is really annoying.
Comment 6 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2006-12-08 19:47:34 UTC
The CC from hell.
Comment 7 Gustavo Zacarias (RETIRED) gentoo-dev 2006-12-11 06:55:27 UTC
ibmtr isn't supported in sparc since it sits in the ISA bus (no sparc box has ISA slots).
Anyhow i've applied and also did sparc-sources-2.4.33.4 that includes others fixes/new grsec now that it's available.

Security fix from 2.4.33.4: backport fix for CVE-2006-4997 to 2.4 tree

I'll leave it ~sparc for a couple of days for feedback.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2006-12-12 20:09:25 UTC
Fixed in:
 Linux 2.6.19.2
 genpatches-2.6.19-3

Leaving myself on CC for now, as there will be another 2.6.18 release soon in order to get this stuff into stable quicker -- would like to get a few more pending security fixes included there before I release.
Comment 9 Andrew Ross (RETIRED) gentoo-dev 2006-12-15 19:55:39 UTC
Fixed in xen-sources-2.6.16.28-r1, thanks.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-12-17 08:01:55 UTC
This isn't a big issue for uml-sources, since you can't drive actual tokenring hardware, and there isn't even any simulated token ring available. I'll wait until the 2.6.18 bump comes out an catch that; leaving myself here so I don't forget.
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-12-21 19:22:46 UTC
Also fixed in genpatches-2.6.18-7 and gentoo-sources-2.6.18-r5 (will go stable tomorrow)
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2006-12-22 15:09:31 UTC
Fixed in suspend2-sources-2.8.18-r2.
Thanks.
Comment 13 Dave Hughes 2006-12-23 07:12:25 UTC
After emerging the latest stable gentoo-sources (2.6.18-r5) I received the following error while running make:

  CC [M]  drivers/net/pcmcia/ibmtr_cs.o
In file included from drivers/net/pcmcia/ibmtr_cs.c:70:
drivers/net/pcmcia/../tokenring/ibmtr.c: In function &#8216;tr_rx&#8217;:
drivers/net/pcmcia/../tokenring/ibmtr.c:1829: error: &#8216;CHECKSUM_COMPLETE&#8217; undeclared (first use in this function)
drivers/net/pcmcia/../tokenring/ibmtr.c:1829: error: (Each undeclared identifier is reported only once
drivers/net/pcmcia/../tokenring/ibmtr.c:1829: error: for each function it appears in.)
make[3]: *** [drivers/net/pcmcia/ibmtr_cs.o] Error 1
make[2]: *** [drivers/net/pcmcia] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
make rc=2

I performed the following search which appears to confirm that CHECKSUM_COMPLETE doesn't appear to be declared anywhere, but is used in drivers/net/tokenring/ibmtr.c:

/usr/src/linux # find -iname "*.h" -o -iname "*.c" | xargs grep CHECKSUM_COMPLETE
./drivers/net/tokenring/ibmtr.c:                skb->ip_summed = CHECKSUM_COMPLETE;

Changing CHECKSUM_COMPLETE to CHECKSUM_HW (declared in include/linux/skbuff.h as 1, equivalent to the value prior to the patch) allowed me to complete the compile (was this a stupid thing to do?).

I can attach my emerge --info or /proc/config.gz if it'll help - but I'm guessing this is just a simple case of mistaken naming?
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2006-12-23 07:49:56 UTC
Looks like this patch is not needed in 2.6.18, sorry about that. Will roll out a new genpatches soon.
Comment 15 Christian Heim (RETIRED) gentoo-dev 2006-12-23 11:12:15 UTC
(In reply to comment #14)
> Looks like this patch is not needed in 2.6.18, sorry about that.

Actually I'd have to be sorry for introducing it to the 2.6.18 branch in the first place.

Harlan: hardened-sources-2.6.19 is revbumped.
Comment 16 Dave Hughes 2006-12-23 18:26:10 UTC
Ah, sorry - I'd completely missed that this was originally a patch against 2.6.19 instead of 2.6.18! So, not a case of mistaken naming, but a case of introducing a patch (which uses CHECKSUM_COMPLETE) into an incompatible version (which doesn't define CHECKSUM_COMPLETE).

I was confused as to why the patch had been signed off when it apparently didn't even compile, but realizing it's a retrofit to a prior kernel version it all makes sense now. Thanks :-)
Comment 17 Guy Martin (RETIRED) gentoo-dev 2006-12-24 06:23:47 UTC
hppa-sources-2.6.19.1 committed.
Afaics, the patch is included into .1.
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2006-12-26 19:33:17 UTC
Bad patch removed from genpatches-2.6.18-8 (gentoo-sources-2.6.18-r6). Sorry for the screwup.
Comment 19 Alon Bar-Lev (RETIRED) gentoo-dev 2006-12-27 08:54:00 UTC
Added to suspend2-sources-2.6.18-r3.
Comment 20 Christian Heim (RETIRED) gentoo-dev 2006-12-27 11:27:02 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Looks like this patch is not needed in 2.6.18, sorry about that.
> 
> Actually I'd have to be sorry for introducing it to the 2.6.18 branch in the
> first place.
> 
> Harlan: hardened-sources-2.6.19 is revbumped.

Fixed with hardened-sources-2.6.19-r3 (for real this time). 2.6.18 also got a bump wrt. broken patch in -7 (thanks to me ;P).

Comment 21 Christian Heim (RETIRED) gentoo-dev 2006-12-27 11:28:10 UTC
(In reply to comment #2)
> Alright, kernels:
>
> vserver-sources

Is now using 2.6.18-8.
Comment 22 Christian Heim (RETIRED) gentoo-dev 2006-12-27 11:44:14 UTC
(In reply to comment #2)
> Alright, kernels:
> 

> openvz-sources

Also revbumped.
Comment 23 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-01-02 20:44:33 UTC
usermode-sources too.
Comment 24 Harlan Lieberman-Berg (RETIRED) gentoo-dev 2007-05-21 23:37:18 UTC
All done.