]> git.itanic.dy.fi Git - linux-stable/commit
netlink: avoid a double skb free in genlmsg_mcast()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 14 Mar 2018 20:10:23 +0000 (21:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Mar 2018 16:11:34 +0000 (18:11 +0200)
commit455fc99cb4e8222c40cf9ae97f4e5845bdcac17c
treec8753be6b2098157043741421fd9606e4aadc436
parent7d91487e4319baddd7580df4993d1478ea86ece8
netlink: avoid a double skb free in genlmsg_mcast()

[ Upstream commit 02a2385f37a7c6594c9d89b64c4a1451276f08eb ]

nlmsg_multicast() consumes always the skb, thus the original skb must be
freed only when this function is called with a clone.

Fixes: cb9f7a9a5c96 ("netlink: ensure to loop over all netns in genlmsg_multicast_allns()")
Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netlink/genetlink.c