Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A0DB25FA3B for ; Tue, 20 May 2025 15:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754676; cv=none; b=Wb6ze7vXOvcCcAIQ2A596M0S/gSt33KAKomjaNdb/N18oaib3pwbguA1ACw4CMMWirDNfjRL1F8botXV/xjGLCWlLwPxr3jWGE/f1GFxZfhdQFukCI/lkz/M2Q0Wu6ERDC0ozZ7g0RshSCl4HnhjddrqgyFpGsrL/QIjqlHgTEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754676; c=relaxed/simple; bh=YMLrfuDZWgk/OAzOGwqkwQik2hKdHQeocWLgsEGVU54=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qMAQtGf5JJSkQ3V3AF2Kt1nmqsbLKFWDCaRGwgF2ts8NSs0Y+JVhPjlkNYvUhDMRgaX5LnyZLvjrt7aUglJoepp5h/c2EcQzrc6qNdNtnwXGlwOLgJrwXLH7VijznSniNcpiyteJqM+VqeYDwt9XQaPp+jmEqhqHyl1OAVQ3pRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vWqXsBhA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vWqXsBhA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41BFBC4CEEA; Tue, 20 May 2025 15:24:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747754675; bh=YMLrfuDZWgk/OAzOGwqkwQik2hKdHQeocWLgsEGVU54=; h=From:To:Cc:Subject:Date:Reply-to:From; b=vWqXsBhAYDS1hfaZsMASVuQ+XDaRTVJPCOU46ys5stqUsK5QskYLlL1Vslq8iZH+0 xwpHIYuUraJVmkeZv4pMsqA2KpyOz4naUSrXTHj9Ww6l3aBzJU0ytDK7mh9wNUSblX Q/fUT19iooFaWt/oiLx+ty0sZseV+Ujf05LHI+K0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37917: net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll Date: Tue, 20 May 2025 17:22:14 +0200 Message-ID: <2025052001-CVE-2025-37917-d12e@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4324; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TRnt5SqIhklp6bOfSBR8ztjqfd4tMCc6XpaEfXQTTPw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk68yS9OWJbX2zoujy5pSC297nZw9iT3VOP9T+2eidSc /6K9I6ejlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI3h6GBQv7kuNavnhHPmkR WNNw0HHRWu8/axnmqYfPFrvIu867cO8jzy1FJhslZNKMAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll Use spin_lock_irqsave and spin_unlock_irqrestore instead of spin_lock and spin_unlock in mtk_star_emac driver to avoid spinlock recursion occurrence that can happen when enabling the DMA interrupts again in rx/tx poll. ``` BUG: spinlock recursion on CPU#0, swapper/0/0 lock: 0xffff00000db9cf20, .magic: dead4ead, .owner: swapper/0/0, .owner_cpu: 0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.15.0-rc2-next-20250417-00001-gf6a27738686c-dirty #28 PREEMPT Hardware name: MediaTek MT8365 Open Platform EVK (DT) Call trace: show_stack+0x18/0x24 (C) dump_stack_lvl+0x60/0x80 dump_stack+0x18/0x24 spin_dump+0x78/0x88 do_raw_spin_lock+0x11c/0x120 _raw_spin_lock+0x20/0x2c mtk_star_handle_irq+0xc0/0x22c [mtk_star_emac] __handle_irq_event_percpu+0x48/0x140 handle_irq_event+0x4c/0xb0 handle_fasteoi_irq+0xa0/0x1bc handle_irq_desc+0x34/0x58 generic_handle_domain_irq+0x1c/0x28 gic_handle_irq+0x4c/0x120 do_interrupt_handler+0x50/0x84 el1_interrupt+0x34/0x68 el1h_64_irq_handler+0x18/0x24 el1h_64_irq+0x6c/0x70 regmap_mmio_read32le+0xc/0x20 (P) _regmap_bus_reg_read+0x6c/0xac _regmap_read+0x60/0xdc regmap_read+0x4c/0x80 mtk_star_rx_poll+0x2f4/0x39c [mtk_star_emac] __napi_poll+0x38/0x188 net_rx_action+0x164/0x2c0 handle_softirqs+0x100/0x244 __do_softirq+0x14/0x20 ____do_softirq+0x10/0x20 call_on_irq_stack+0x24/0x64 do_softirq_own_stack+0x1c/0x40 __irq_exit_rcu+0xd4/0x10c irq_exit_rcu+0x10/0x1c el1_interrupt+0x38/0x68 el1h_64_irq_handler+0x18/0x24 el1h_64_irq+0x6c/0x70 cpuidle_enter_state+0xac/0x320 (P) cpuidle_enter+0x38/0x50 do_idle+0x1e4/0x260 cpu_startup_entry+0x34/0x3c rest_init+0xdc/0xe0 console_on_rootfs+0x0/0x6c __primary_switched+0x88/0x90 ``` The Linux kernel CVE team has assigned CVE-2025-37917 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 0a8bd81fd6aaace14979152e0540da8ff158a00a and fixed in 6.1.138 with commit 94107259f972d2fd896dbbcaa176b3b2451ff9e5 Issue introduced in 6.0 with commit 0a8bd81fd6aaace14979152e0540da8ff158a00a and fixed in 6.6.90 with commit 7cb10f17bddc415f30fbc00a4e2b490e0d94c462 Issue introduced in 6.0 with commit 0a8bd81fd6aaace14979152e0540da8ff158a00a and fixed in 6.12.28 with commit 8d40bf73fa7f31eac2b0a7c9d85de67df82ee7f3 Issue introduced in 6.0 with commit 0a8bd81fd6aaace14979152e0540da8ff158a00a and fixed in 6.14.6 with commit d886f8d85494d12b2752fd7c6c32162d982d5dd5 Issue introduced in 6.0 with commit 0a8bd81fd6aaace14979152e0540da8ff158a00a and fixed in 6.15-rc5 with commit 6fe0866014486736cc3ba1c6fd4606d3dbe55c9c Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-37917 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/mediatek/mtk_star_emac.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/bedd287fdd3142dffad7ae2ac6ef15f4a2ad0629 https://git.kernel.org/stable/c/94107259f972d2fd896dbbcaa176b3b2451ff9e5 https://git.kernel.org/stable/c/7cb10f17bddc415f30fbc00a4e2b490e0d94c462 https://git.kernel.org/stable/c/8d40bf73fa7f31eac2b0a7c9d85de67df82ee7f3 https://git.kernel.org/stable/c/d886f8d85494d12b2752fd7c6c32162d982d5dd5 https://git.kernel.org/stable/c/6fe0866014486736cc3ba1c6fd4606d3dbe55c9c