+ skb-leak-in-drivers-isdn-i4l-isdn_x25ifacec.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     SKB leak in drivers/isdn/i4l/isdn_x25iface.c

has been added to the -mm tree.  Its filename is

     skb-leak-in-drivers-isdn-i4l-isdn_x25ifacec.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: SKB leak in drivers/isdn/i4l/isdn_x25iface.c
From: Eric Sesterhenn <snakebyte@xxxxxx>

Coverity spotted this leak (id #613), when we are not configured, we return
without freeing the allocated skb.

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
Cc: Karsten Keil <kkeil@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/isdn/i4l/isdn_x25iface.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN drivers/isdn/i4l/isdn_x25iface.c~skb-leak-in-drivers-isdn-i4l-isdn_x25ifacec drivers/isdn/i4l/isdn_x25iface.c
--- a/drivers/isdn/i4l/isdn_x25iface.c~skb-leak-in-drivers-isdn-i4l-isdn_x25ifacec
+++ a/drivers/isdn/i4l/isdn_x25iface.c
@@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct 
  */
 static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
 {
-	struct sk_buff * skb = dev_alloc_skb(1);
+	struct sk_buff * skb;
 	enum wan_states *state_p 
 	  = &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state);
 	IX25DEBUG( "isdn_x25iface_connect_ind %s \n"
@@ -220,6 +220,8 @@ static int isdn_x25iface_connect_ind(str
 		return -1;
 	}
 	*state_p = WAN_CONNECTED;
+
+	skb = dev_alloc_skb(1);
 	if( skb ){
 		*( skb_put(skb, 1) ) = 0x01;
 		skb->protocol = x25_type_trans(skb, cprot->net_dev);
_

Patches currently in -mm which might be from snakebyte@xxxxxx are

origin.patch
git-gfs2.patch
typo-in-drivers-net-e1000-e1000_hwc.patch
git-wireless.patch
skb-leak-in-drivers-isdn-i4l-isdn_x25ifacec.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux