{"id":4876,"date":"2026-09-04T18:46:50","date_gmt":"2026-09-04T10:46:50","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-64586"},"modified":"2026-09-04T18:46:50","modified_gmt":"2026-09-04T10:46:50","slug":"cve-2026-64586","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-64586","title":{"rendered":"CVE-2026-64586 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: brcmfmac: drain"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>wifi: brcmfmac: drain bus_reset work on device removal<\/p>\n<p>brcmf_fw_crashed() and the debugfs &#8220;reset&#8221; entry both schedule<br \/>\ndrvr-&gt;bus_reset, whose callback recovers drvr through container_of()<br \/>\nand dereferences it.  The removal path frees drvr (brcmf_free -&gt;<br \/>\nwiphy_free) without draining the work, so a bus_reset callback pending<br \/>\nor running during removal can outlive drvr.<\/p>\n<p>Cancellation cannot live in brcmf_detach() or brcmf_free(): the work<br \/>\ncallback reaches teardown through the bus .reset op (PCIe<br \/>\nbrcmf_pcie_reset -&gt; brcmf_detach; SDIO brcmf_sdio_bus_reset -&gt;<br \/>\nbrcmf_sdiod_remove -&gt; brcmf_free), so cancelling there would wait for<br \/>\nthe running work and deadlock.<\/p>\n<p>Add a per-bus mutex (bus_reset_lock) and route all arming through<br \/>\nbrcmf_bus_schedule_reset(), which under the lock skips when the bus is<br \/>\nmarked removing.  Each bus remove entry calls<br \/>\nbrcmf_bus_cancel_reset_work(), which under the same lock sets removing<br \/>\nand cancels the work.  Holding the mutex across cancel_work_sync() makes<br \/>\nthe set-removing + drain step atomic.  Every producer reaches the arming<br \/>\npath from process context &#8212; the PCIe firmware-halt notification runs in<br \/>\nthe threaded IRQ handler (brcmf_pcie_isr_thread) and the SDIO hostmail<br \/>\npath runs from the data workqueue &#8212; so the mutex is taken only in<br \/>\nsleepable contexts.  Where applicable the remove entry first stops the<br \/>\nfirmware-crash producer: on PCIe mask the mailbox and synchronize_irq;<br \/>\non SDIO unregister the bus interrupt and cancel the data worker, which<br \/>\nalso reports firmware halts through brcmf_fw_crashed().  The mutex is<br \/>\ninitialized at bus allocation.  The SDIO suspend power-off path frees<br \/>\ndrvr through the same brcmf_sdiod_remove() and takes the same lock;<br \/>\nresume re-allows the work only on a successful re-probe.<\/p>\n<p>Also guard brcmf_fw_crashed() against a NULL bus_if\/drvr: it can fire<br \/>\nbefore brcmf_attach() wires up drvr, and it dereferences drvr<br \/>\n(bphy_err\/brcmf_dev_coredump) before reaching the arming gate.<\/p>\n<p>The bus_reset work is shared across buses, so the drain is applied to<br \/>\nevery remove path: PCIe (the .reset op introduced by the Fixes commit),<br \/>\nSDIO (arms the same work through brcmf_fw_crashed()), and USB (via the<br \/>\ndebugfs &#8220;reset&#8221; entry).  cancel_work_sync() drains a running or pending<br \/>\nbus_reset work item before removal frees drvr, and patch 1\/2 makes the<br \/>\nscratch-buffer release safe when reset teardown has already released<br \/>\nthose DMA buffers.<\/p>\n<p>This patch fixes the lifetime of the bus_reset work item itself.  It does<br \/>\nnot attempt to address the separate, pre-existing lifetime of the<br \/>\nasynchronous firmware completion started by the PCIe reset path.  That<br \/>\ncallback needs its own lifetime\/ownership protocol and is being tracked<br \/>\nseparately.<\/p>\n<p>This issue was found by an in-house static analysis tool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>wifi: brcmfmac: drain bus_reset work on device removal<\/p>\n<p>brcmf_fw_crashed() and the debugfs &#8220;reset&#8221; entry both schedule<br \/>\ndrvr-&gt;bus_re<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-4876","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/4876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}