提交 3e2bc1a7 编写于 作者: H Hoang Le 提交者: Zheng Zengkai

Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv"

stable inclusion
from stable-5.10.42
commit 0aa2212940b85f71b81383e6bfdf70c439eeff04
bugzilla: 55093
CVE: NA

--------------------------------

commit 75016891 upstream.

This reverts commit 6bf24dc0.
Above fix is not correct and caused memory leak issue.

Fixes: 6bf24dc0 ("net:tipc: Fix a double free in tipc_sk_mcast_rcv")
Acked-by: NJon Maloy <jmaloy@redhat.com>
Acked-by: NTung Nguyen <tung.q.nguyen@dektech.com.au>
Signed-off-by: NHoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f7c69614
......@@ -1244,7 +1244,10 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
spin_lock_bh(&inputq->lock);
if (skb_peek(arrvq) == skb) {
skb_queue_splice_tail_init(&tmpq, inputq);
__skb_dequeue(arrvq);
/* Decrease the skb's refcnt as increasing in the
* function tipc_skb_peek
*/
kfree_skb(__skb_dequeue(arrvq));
}
spin_unlock_bh(&inputq->lock);
__skb_queue_purge(&tmpq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册