提交 a2ced2a0 编写于 作者: N Navid Emamdoost 提交者: Xie XiuQi

rsi: release skb if rsi_prepare_beacon fails

mainline inclusion
from mainline-v5.4
commit d563131ef23cbc756026f839a82598c8445bc45f
category: bugfix
bugzilla: 13690
CVE: CVE-2019-19071

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

In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: NNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 cade8b32
...@@ -1583,6 +1583,7 @@ static int rsi_send_beacon(struct rsi_common *common) ...@@ -1583,6 +1583,7 @@ static int rsi_send_beacon(struct rsi_common *common)
skb_pull(skb, (64 - dword_align_bytes)); skb_pull(skb, (64 - dword_align_bytes));
if (rsi_prepare_beacon(common, skb)) { if (rsi_prepare_beacon(common, skb)) {
rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n"); rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n");
dev_kfree_skb(skb);
return -EINVAL; return -EINVAL;
} }
skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb); skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册