This is a note to let you know that I've just added the patch titled

    Staging: batman-adv: ensure that eth_type_trans gets linear memory

to the 2.6.36-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch
and it can be found in the queue-2.6.36 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From b6faaae1a15a352d68b3e3cd8b840e56709820bf Mon Sep 17 00:00:00 2001
From: Marek Lindner <[email protected]>
Date: Mon, 22 Nov 2010 12:34:49 +0100
Subject: Staging: batman-adv: ensure that eth_type_trans gets linear memory

From: Marek Lindner <[email protected]>

commit b6faaae1a15a352d68b3e3cd8b840e56709820bf upstream.

eth_type_trans tries to pull data with the length of the ethernet header
from the skb. We only ensured that enough data for the first ethernet
header and the batman header is available in non-paged memory of the skb
and not for the ethernet after the batman header.

eth_type_trans would fail sometimes with drivers which don't ensure that
all there data is perfectly linearised.

The failure was noticed through a kernel bug Oops generated by the
skb_pull inside eth_type_trans.

Reported-by: Rafal Lesniak <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/staging/batman-adv/soft-interface.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/staging/batman-adv/soft-interface.c
+++ b/drivers/staging/batman-adv/soft-interface.c
@@ -246,6 +246,10 @@ void interface_rx(struct sk_buff *skb, i
        skb_pull_rcsum(skb, hdr_size);
 /*     skb_set_mac_header(skb, -sizeof(struct ethhdr));*/
 
+       if (unlikely(!pskb_may_pull(skb, ETH_HLEN))) {
+               kfree_skb(skb);
+               return;
+       }
        skb->dev = dev;
        skb->protocol = eth_type_trans(skb, dev);
 


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.36/staging-batman-adv-ensure-that-eth_type_trans-gets-linear-memory.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to