netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH]: Fix skb leak in igmpv3_newpack
Date: Fri, 28 May 2004 12:54:26 +0200	[thread overview]
Message-ID: <40B71A62.6050008@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

This patch fixes an skb-leak in igmpv3_newpack. skb isn't
freed when rt->rt_src == 0. Patch applies to 2.4 and 2.6.

Regards
Patrick

[-- Attachment #2: igmpv3_newpack-skbleak.diff --]
[-- Type: text/x-patch, Size: 530 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/05/28 12:30:41+02:00 kaber@trash.net 
#   [IPV4]: Fix skb leak in igmpv3_newpack
# 
# net/ipv4/igmp.c
#   2004/05/28 12:30:34+02:00 kaber@trash.net +1 -0
#   [IPV4]: Fix skb leak in igmpv3_newpack
# 
diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c	2004-05-28 12:35:28 +02:00
+++ b/net/ipv4/igmp.c	2004-05-28 12:35:28 +02:00
@@ -292,6 +292,7 @@
 		}
 	}
 	if (rt->rt_src == 0) {
+		kfree_skb(skb);
 		ip_rt_put(rt);
 		return 0;
 	}

             reply	other threads:[~2004-05-28 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-28 10:54 Patrick McHardy [this message]
2004-05-29 19:39 ` [PATCH]: Fix skb leak in igmpv3_newpack David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40B71A62.6050008@trash.net \
    --to=kaber@trash.net \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).