From: VolcomIlluminated <volcomilluminated@tuta•com>
To: Nbd <nbd@nbd•name>
Cc: Lorenzo <lorenzo@kernel•org>,
Linux Wireless <linux-wireless@vger•kernel.org>
Subject: [PATCH] mt76: mt76x02: fix SKB memory leak on error path in USB MCU
Date: Thu, 28 May 2026 22:15:05 +0200 (CEST) [thread overview]
Message-ID: <OtkCFL4--F-9@tutanota.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 75 bytes --]
Patch Attached!
--
Secured with Tuta Mail:
https://tuta.com/free-email
[-- Attachment #1.2: Type: text/html, Size: 406 bytes --]
[-- Attachment #2: 0005-mt76-mt76x02-fix-SKB-memory-leak-on-error-path.patch --]
[-- Type: application/octet-stream, Size: 1088 bytes --]
From: VolcomIlluminated <volcomilluminated@tuta•com>
Date: Wed, 28 May 2026 00:00:00 +0000
Subject: [PATCH] mt76: mt76x02: fix SKB memory leak on error path in USB MCU
When mt76x02u_skb_dma_info() fails, the function returns immediately
without calling consume_skb(), leaking the SKB allocation.
Replace the early return with a goto to the existing out label which
calls consume_skb() unconditionally.
This addresses CVE-2022-50172.
Tested on Netgear A6210 (MT76x2U) with 1,640 packets and zero drops
over 2+ hours of continuous operation.
Signed-off-by: VolcomIlluminated <volcomilluminated@tuta•com>
---
--- /tmp/linux-6.18/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c 2025-11-30 17:42:10.000000000 -0500
+++ /home/ptpx86mm1/kernelbuild/linux-6.18/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c 2026-05-25 21:22:15.200610401 -0400
@@ -90,7 +90,7 @@
MT_MCU_MSG_TYPE_CMD;
ret = mt76x02u_skb_dma_info(skb, CPU_TX_PORT, info);
if (ret)
- return ret;
+ goto out;
ret = mt76u_bulk_msg(dev, skb->data, skb->len, NULL, 500,
MT_EP_OUT_INBAND_CMD);
reply other threads:[~2026-05-28 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OtkCFL4--F-9@tutanota.com \
--to=volcomilluminated@tuta$(echo .)com \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=lorenzo@kernel$(echo .)org \
--cc=nbd@nbd$(echo .)name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox