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 185782E6CDE for ; Tue, 30 Dec 2025 12:16:29 +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=1767096989; cv=none; b=nrppNT+ccnMCrncpIZ/Z6IFJuZG/QEpoSxTFQmRwF++mOGBhkW+1DUE+M2voU1/dwkY789v8E1bSM8LqyEZfo9SPtuPsnxrD7Eo0uivBFypWDSi1UQgBXFYF7iTo3URTfCkoSZwiA+gkM99KJPDuUuyoqyjK3rETtPCJFViW0SM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096989; c=relaxed/simple; bh=b5hfxGBlP8ZMX1fbMj492/9gnvfynyvSktzPVhYtK10=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=W48jvtNoIplPphNzTGNT3nBNdH4+DONHKqi6Y742yiwwRqyueEbqm14ta0uAJYDADMTyjpSp+ltqQxpSsaZVdvWPgtbEX1mz30EuzG7iyZvQfKhnEHw/fqDcohSL0oiz2ZnAQMuKxXk8p/45ni5naVnf9J6thHJVrmkqbvu5c8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KYBPElIe; 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="KYBPElIe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 994E4C4CEFB; Tue, 30 Dec 2025 12:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096989; bh=b5hfxGBlP8ZMX1fbMj492/9gnvfynyvSktzPVhYtK10=; h=From:To:Cc:Subject:Date:Reply-To:From; b=KYBPElIeTsD5buUxmli5J+SNY+Tc0sP3qs0FnOlKTz6xSBmO/5XZIqDAWySP1+Ibz IgM6+3TYanL1/ctdb2LTa5X/79BlLGF3DbwsQUYxXB5pmqtM9bJCSQLaraCMINl8CE OBBuHpcQNe9L8UCl8KTqOZyBMYmE2WGYokX5AtHo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54240: net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all() Date: Tue, 30 Dec 2025 13:14:10 +0100 Message-ID: <2025123033-CVE-2023-54240-b9f8@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3376; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QfSB4T1UV/0Pma45+VBkxRChhsTyx8Yg3gCbba1vmME=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB9+2Vvzc/CPH4/uxYzd/LH6zmkHnx623aQsn7pqse 7becqfS4o5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYyLpchgWtJ/M/1969n8Dq brmu6dfZWhbrTz0M8x1f/3P5bH3Kysv92Y28opjST2wHegA= 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_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all() rule_locs is allocated in ethtool_get_rxnfc and the size is determined by rule_cnt from user space. So rule_cnt needs to be check before using rule_locs to avoid NULL pointer dereference. The Linux kernel CVE team has assigned CVE-2023-54240 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 4.14.326 with commit 7776591e5ae2befff86579f68916a171971c6aab Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 4.19.295 with commit 751b2e22a188b0c306029d094da29b6b8de31430 Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 5.4.257 with commit 653fbddbdfc6673bba01b13dae5a4384ad8f92ec Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 5.10.195 with commit 75f2de75c1182e80708c932418e4895dbc88b68f Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 5.15.132 with commit 072324cfab9b96071c0782f51f53cc5aea1e9d5b Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 6.1.54 with commit ff5faed5f5487b0fd2b640ba1304f82a5ebaab42 Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 6.5.4 with commit fe0195fe48f85182bc7e7eabcad925bd3cbc10f5 Issue introduced in 4.9 with commit 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd and fixed in 6.6 with commit e4c79810755f66c9a933ca810da2724133b1165a 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-2023-54240 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_eth_soc.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/7776591e5ae2befff86579f68916a171971c6aab https://git.kernel.org/stable/c/751b2e22a188b0c306029d094da29b6b8de31430 https://git.kernel.org/stable/c/653fbddbdfc6673bba01b13dae5a4384ad8f92ec https://git.kernel.org/stable/c/75f2de75c1182e80708c932418e4895dbc88b68f https://git.kernel.org/stable/c/072324cfab9b96071c0782f51f53cc5aea1e9d5b https://git.kernel.org/stable/c/ff5faed5f5487b0fd2b640ba1304f82a5ebaab42 https://git.kernel.org/stable/c/fe0195fe48f85182bc7e7eabcad925bd3cbc10f5 https://git.kernel.org/stable/c/e4c79810755f66c9a933ca810da2724133b1165a