All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
@ 2013-01-23 17:11 Matthias Schiffer
  2013-01-23 17:11 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries Matthias Schiffer
  2013-01-23 21:11 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply() Antonio Quartulli
  0 siblings, 2 replies; 23+ messages in thread
From: Matthias Schiffer @ 2013-01-23 17:11 UTC (permalink / raw)
  To: b.a.t.m.a.n

The callers of batadv_dat_snoop_incoming_arp_reply() assume the skb has been
freed when it returns true; fix this by calling kfree_skb before returning as
it is done in batadv_dat_snoop_incoming_arp_request().

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
 distributed-arp-table.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/distributed-arp-table.c b/distributed-arp-table.c
index 7485a78..9f4cff3 100644
--- a/distributed-arp-table.c
+++ b/distributed-arp-table.c
@@ -1012,6 +1012,8 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
 	 */
 	ret = !batadv_is_my_client(bat_priv, hw_dst);
 out:
+	if (ret)
+		kfree_skb(skb);
 	/* if ret == false -> packet has to be delivered to the interface */
 	return ret;
 }
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-01-27  0:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 17:11 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply() Matthias Schiffer
2013-01-23 17:11 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: filter out invalid DAT entries Matthias Schiffer
2013-01-23 21:07   ` Antonio Quartulli
2013-01-23 21:39     ` Matthias Schiffer
2013-01-23 21:52       ` Matthias Schiffer
2013-01-23 21:55         ` Antonio Quartulli
2013-01-23 21:53       ` Antonio Quartulli
2013-01-24 13:36         ` Marek Lindner
2013-01-24 13:38           ` Antonio Quartulli
2013-01-24 13:47             ` Marek Lindner
2013-01-24 14:44               ` Matthias Schiffer
2013-01-24 15:12                 ` Antonio Quartulli
2013-01-24 17:18                   ` Matthias Schiffer
2013-01-24 17:18                     ` [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: check for more types of invalid IP addresses in DAT Matthias Schiffer
2013-01-24 17:18                       ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: filter ARP packets with invalid MAC " Matthias Schiffer
2013-01-24 17:33                         ` Matthias Schiffer
2013-01-25 13:28                         ` Antonio Quartulli
2013-01-27  0:38                           ` Marek Lindner
2013-01-25 13:27                       ` [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: check for more types of invalid IP " Antonio Quartulli
2013-01-27  0:34                         ` Marek Lindner
2013-01-23 21:11 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply() Antonio Quartulli
2013-01-23 21:14   ` Antonio Quartulli
2013-01-24 13:31     ` Marek Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.