Message ID | 631e6a06fb640ec4f81c92b57d31eb0f7b23c351.1669814212.git.deren.wu@mediatek.com |
---|---|
State | New |
Headers | show |
Series | wifi: mt76: mt7921s: fix slab-out-of-bounds access in sdio host | expand |
diff --git a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c index bfc4de50a4d2..ebea5c4e8da5 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio_txrx.c +++ b/drivers/net/wireless/mediatek/mt76/sdio_txrx.c @@ -254,7 +254,8 @@ static int mt76s_tx_run_queue(struct mt76_dev *dev, struct mt76_queue *q) if (!test_bit(MT76_STATE_MCU_RUNNING, &dev->phy.state)) { __skb_put_zero(e->skb, 4); - err = __mt76s_xmit_queue(dev, e->skb->data, + memcpy(sdio->xmit_buf, e->skb->data, e->skb->len); + err = __mt76s_xmit_queue(dev, sdio->xmit_buf, e->skb->len); if (err) return err;