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

Filename Description Type Creator Created Size Actions
ibmtr.c.patch the upstream patch that went into git13 patch Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:20 0000 27.95 KB Details | Diff
ibmtr.c.patch The RIGHT patch (bugzie! :( ) patch Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:40 0000 635 bytes Details | Diff
ibmtr.patch OK... this is really annoying. patch Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:43 0000 1.04 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 157186 depends on: Show dependency tree
Show dependency graph
Bug 157186 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: 2006-12-05 01:18 0000
[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 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:20:03 0000 -------
Created an attachment (id=103651) [edit]
the upstream patch that went into git13

------- Comment #2 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:21:02 0000 -------
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 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:38:39 0000 -------
(From update of attachment 103651 [edit])
--- 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 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:40:07 0000 -------
Created an attachment (id=103653) [edit]
The RIGHT patch (bugzie! :( )

------- Comment #5 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:43:07 0000 -------
Created an attachment (id=103655) [edit]
OK... this is really annoying.

------- Comment #6 From Harlan Lieberman-Berg (RETIRED) 2006-12-08 19:47:34 0000 -------
The CC from hell.

------- Comment #7 From Gustavo Zacarias (RETIRED) 2006-12-11 06:55:27 0000 -------
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 From Daniel Drake 2006-12-12 20:09:25 0000 -------
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 From Andrew Ross (RETIRED) 2006-12-15 19:55:39 0000 -------
Fixed in xen-sources-2.6.16.28-r1, thanks.

------- Comment #10 From Daniel Gryniewicz 2006-12-17 08:01:55 0000 -------
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 From Daniel Drake 2006-12-21 19:22:46 0000 -------
Also fixed in genpatches-2.6.18-7 and gentoo-sources-2.6.18-r5 (will go stable
tomorrow)

------- Comment #12 From Alon Bar-Lev (RETIRED) 2006-12-22 15:09:31 0000 -------
Fixed in suspend2-sources-2.8.18-r2.
Thanks.

------- Comment #13 From Dave Hughes 2006-12-23 07:12:25 0000 -------
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 From Daniel Drake 2006-12-23 07:49:56 0000 -------
Looks like this patch is not needed in 2.6.18, sorry about that. Will roll out
a new genpatches soon.

------- Comment #15 From Christian Heim (RETIRED) 2006-12-23 11:12:15 0000 -------
(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 From Dave Hughes 2006-12-23 18:26:10 0000 -------
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 From Guy Martin 2006-12-24 06:23:47 0000 -------
hppa-sources-2.6.19.1 committed.
Afaics, the patch is included into .1.

------- Comment #18 From Daniel Drake 2006-12-26 19:33:17 0000 -------
Bad patch removed from genpatches-2.6.18-8 (gentoo-sources-2.6.18-r6). Sorry
for the screwup.

------- Comment #19 From Alon Bar-Lev (RETIRED) 2006-12-27 08:54:00 0000 -------
Added to suspend2-sources-2.6.18-r3.

------- Comment #20 From Christian Heim (RETIRED) 2006-12-27 11:27:02 0000 -------
(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 From Christian Heim (RETIRED) 2006-12-27 11:28:10 0000 -------
(In reply to comment #2)
> Alright, kernels:
>
> vserver-sources

Is now using 2.6.18-8.

------- Comment #22 From Christian Heim (RETIRED) 2006-12-27 11:44:14 0000 -------
(In reply to comment #2)
> Alright, kernels:
> 

> openvz-sources

Also revbumped.

------- Comment #23 From Daniel Gryniewicz 2007-01-02 20:44:33 0000 -------
usermode-sources too.

------- Comment #24 From Harlan Lieberman-Berg (RETIRED) 2007-05-21 23:37:18 0000 -------
All done. 

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