mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
tipc: add NULL pointer check
skb somehow dequeued out of inputq before processing, it causes to
NULL pointer and kernel crashed.
Add checking skb valid before using.
Fixes: c55c8edafa
("tipc: smooth change between replicast and broadcast")
Reported-by: Tuong Lien Tong <tuong.t.lien@dektech.com.au>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
95e27a4da6
commit
e1279ff7ae
1 changed files with 3 additions and 0 deletions
|
@ -769,6 +769,9 @@ void tipc_mcast_filter_msg(struct net *net, struct sk_buff_head *defq,
|
|||
u32 node, port;
|
||||
|
||||
skb = skb_peek(inputq);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
hdr = buf_msg(skb);
|
||||
|
||||
if (likely(!msg_is_syn(hdr) && skb_queue_empty(defq)))
|
||||
|
|
Loading…
Reference in a new issue