提交 1888b4cd 编写于 作者: H Hoang Le 提交者: Xie XiuQi

tipc: fix skb may be leaky in tipc_link_input

mainline inclusion
from mainline-5.0
commit 7384b538
category: bugfix
bugzilla: NA
CVE: NA

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

When we free skb at tipc_data_input, we return a 'false' boolean.
Then, skb passed to subcalling tipc_link_input in tipc_link_rcv,

<snip>
1303 int tipc_link_rcv:
...
1354    if (!tipc_data_input(l, skb, l->inputq))
1355        rc |= tipc_link_input(l, skb, l->inputq);
</snip>

Fix it by simple changing to a 'true' boolean when skb is being free-ed.
Then, tipc_link_rcv will bypassed to subcalling tipc_link_input as above
condition.
Acked-by: NYing Xue <ying.xue@windriver.com>
Acked-by: NJon Maloy <maloy@donjonn.com>
Signed-off-by: NHoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NZhiqiang Liu <liuzhiqiang26@huawei.com>
Reviewed-by: NMao Wenan <maowenan@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 9975c8ea
...@@ -1107,7 +1107,7 @@ static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb, ...@@ -1107,7 +1107,7 @@ static bool tipc_data_input(struct tipc_link *l, struct sk_buff *skb,
default: default:
pr_warn("Dropping received illegal msg type\n"); pr_warn("Dropping received illegal msg type\n");
kfree_skb(skb); kfree_skb(skb);
return false; return true;
}; };
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册