Skip to content

Commit d2a1d95

Browse files
committed
wifi: mt76: mt7925e: fix use-after-free in free_irq()
jira LE-1907 cve CVE-2024-27049 Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4 commit-author Deren Wu <deren.wu@mediatek.com> commit a5a5f44 From commit a304e1b ("[PATCH] Debug shared irqs"), there is a test to make sure the shared irq handler should be able to handle the unexpected event after deregistration. For this case, let's apply MT76_REMOVED flag to indicate the device was removed and do not run into the resource access anymore. Fixes: c948b5d ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit a5a5f44) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 2cac597 commit d2a1d95

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7925

1 file changed

+1
-0
lines changed

drivers/net/wireless/mediatek/mt76/mt7925/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ static void mt7925_pci_remove(struct pci_dev *pdev)
425425
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
426426

427427
mt7925e_unregister_device(dev);
428+
set_bit(MT76_REMOVED, &mdev->phy.state);
428429
devm_free_irq(&pdev->dev, pdev->irq, dev);
429430
mt76_free_device(&dev->mt76);
430431
pci_free_irq_vectors(pdev);

0 commit comments

Comments
 (0)