]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] TOKENRING: Remote memory corruptor in ibmtr.c
authorDavid Miller <davem@davemloft.net>
Tue, 5 Dec 2006 03:57:11 +0000 (19:57 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Dec 2006 19:32:39 +0000 (11:32 -0800)
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: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/tokenring/ibmtr.c

index bfe59865b1dd50e5c4dbd4cefe506a31e1495a1a..0d97e10ccac580e16d3dffbe4a9a88144360e64a 100644 (file)
@@ -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;