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

    net: Fix header size check for GSO case in recvmsg (af_packet)

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:
     net-fix-header-size-check-for-gso-case-in-recvmsg-af_packet.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 0ea6875ae44c16d0d60c78b907a629bfd0469fc5 Mon Sep 17 00:00:00 2001
From: Mariusz Kozlowski <[email protected]>
Date: Mon, 8 Nov 2010 11:58:45 +0000
Subject: net: Fix header size check for GSO case in recvmsg (af_packet)


From: Mariusz Kozlowski <[email protected]>

[ Upstream commit 54dd76848bf67b9fa40ac0340e5ee9c2876d5393 ]

Parameter 'len' is size_t type so it will never get negative.

Signed-off-by: Mariusz Kozlowski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/packet/af_packet.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1610,9 +1610,11 @@ static int packet_recvmsg(struct kiocb *
 
                err = -EINVAL;
                vnet_hdr_len = sizeof(vnet_hdr);
-               if ((len -= vnet_hdr_len) < 0)
+               if (len < vnet_hdr_len)
                        goto out_free;
 
+               len -= vnet_hdr_len;
+
                if (skb_is_gso(skb)) {
                        struct skb_shared_info *sinfo = skb_shinfo(skb);
 


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

queue-2.6.36/net-fix-header-size-check-for-gso-case-in-recvmsg-af_packet.patch

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

Reply via email to