浏览代码

[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>
Al Viro 18 年之前
父节点
当前提交
ee28b0da10
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/tokenring/ibmtr.c

+ 1 - 1
drivers/net/tokenring/ibmtr.c

@@ -1826,7 +1826,7 @@ static void tr_rx(struct net_device *dev)
 	skb->protocol = tr_type_trans(skb, dev);
 	skb->protocol = tr_type_trans(skb, dev);
 	if (IPv4_p) {
 	if (IPv4_p) {
 		skb->csum = chksum;
 		skb->csum = chksum;
-		skb->ip_summed = 1;
+		skb->ip_summed = CHECKSUM_COMPLETE;
 	}
 	}
 	netif_rx(skb);
 	netif_rx(skb);
 	dev->last_rx = jiffies;
 	dev->last_rx = jiffies;