* [PATCH] mwifiex: Add check for skb_copy
@ 2023-07-07 9:51 Jiasheng Jiang
2023-07-13 0:55 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2023-07-07 9:51 UTC (permalink / raw)
To: amitkarwar, ganapathi017, sharvari.harisangam, huxinming820,
kvalo, dkiran, patila, bzhao, linville
Cc: linux-wireless, linux-kernel, Jiasheng Jiang
Add check for the return value of skb_copy in order to avoid NULL pointer
dereference.
Fixes: 838e4f449297 ("mwifiex: improve uAP RX handling")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
index e495f7eaea03..9cfa5de57207 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
@@ -243,6 +243,8 @@ int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv,
if (is_multicast_ether_addr(ra)) {
skb_uap = skb_copy(skb, GFP_ATOMIC);
+ if (!skb_uap)
+ return -ENOMEM;
mwifiex_uap_queue_bridged_pkt(priv, skb_uap);
} else {
if (mwifiex_get_sta_entry(priv, ra)) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mwifiex: Add check for skb_copy
2023-07-07 9:51 [PATCH] mwifiex: Add check for skb_copy Jiasheng Jiang
@ 2023-07-13 0:55 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2023-07-13 0:55 UTC (permalink / raw)
To: amitkarwar, ganapathi017, sharvari.harisangam, huxinming820
Cc: Jiasheng Jiang, kvalo, dkiran, patila, bzhao, linville,
linux-wireless, linux-kernel
On Fri, 7 Jul 2023 17:51:21 +0800 Jiasheng Jiang wrote:
> Add check for the return value of skb_copy in order to avoid NULL pointer
> dereference.
>
> Fixes: 838e4f449297 ("mwifiex: improve uAP RX handling")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Amitkumar, Ganapathi, Sharvari, Xinming please review.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-13 0:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-07 9:51 [PATCH] mwifiex: Add check for skb_copy Jiasheng Jiang
2023-07-13 0:55 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).