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 D141E28C2AA for ; Thu, 10 Jul 2025 08:16:55 +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=1752135415; cv=none; b=RGXT73g6QPTNK/74c52beF58RPJVMXT4zjNxnVwSRWi2Y7d8iS18bBBMVbnUHqGY+npB08RlL0HJOlctLCc2gkBTXa8uO8tH6xkiLeDG6rl3ybazfECli7BZhKfXeWyL9frXjwkXmt/+NBn4GHSPTQ6GY13AE61Mue1TLilSg2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752135415; c=relaxed/simple; bh=nO59I8oxH+28wiLuLoWnTieYk248XIxZAsrLnOQ9OmU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I9SRu4Zr849WByi0/N8TVW1U/ONiGvtYrQYSfFw6vjWHjMRiItpPEN7VkJOofhNQfz2vpgCqsu45yKwhAQ+R+8qV39w7bVgxSGIpgtwGf6vXu58ZkEix/GI+piHDlUYp5kv+H9E5s5isXXJQJLshrdydNL46CW6jSailUpw7A78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VeE1Nam9; 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="VeE1Nam9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EAA1C4CEE3; Thu, 10 Jul 2025 08:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752135415; bh=nO59I8oxH+28wiLuLoWnTieYk248XIxZAsrLnOQ9OmU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VeE1Nam9VGvkycmQhhfrlW0272nJfGNxh64jzSGIzpE7uw6AA2gFmhlsR9GlZ1+19 k4QybVWAmv2616+i7wOtOINmbpMo2/F3bqiABiFg5koDFvaRiUNBO6IcWNbp5D50Ev a66Z3/NbBSxSD39dSbdozfrXgM4cmVthHCjx2H6U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38348: wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback() Date: Thu, 10 Jul 2025 10:15:56 +0200 Message-ID: <2025071036-CVE-2025-38348-ffc7@gregkh> X-Mailer: git-send-email 2.50.1 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=4853; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=j9Dty2egeSl6pVTbod2ZyqJkI1jBff1zd7SXf/KdbcQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBn5ZSu8HyX/n3bM8veR/xHXJrDMsdzkLdLZ9v7P1Et7u K2+rczX6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJiL1kWHAh4u0X3l0vU2oL djOr/6zvKCvQeM8wPyL1/36tJZePdrHx3nUy9dgoN3dWMwA= 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: wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback() Robert Morris reported: |If a malicious USB device pretends to be an Intersil p54 wifi |interface and generates an eeprom_readback message with a large |eeprom->v1.len, p54_rx_eeprom_readback() will copy data from the |message beyond the end of priv->eeprom. | |static void p54_rx_eeprom_readback(struct p54_common *priv, | struct sk_buff *skb) |{ | struct p54_hdr *hdr = (struct p54_hdr *) skb->data; | struct p54_eeprom_lm86 *eeprom = (struct p54_eeprom_lm86 *) hdr->data; | | if (priv->fw_var >= 0x509) { | memcpy(priv->eeprom, eeprom->v2.data, | le16_to_cpu(eeprom->v2.len)); | } else { | memcpy(priv->eeprom, eeprom->v1.data, | le16_to_cpu(eeprom->v1.len)); | } | [...] The eeprom->v{1,2}.len is set by the driver in p54_download_eeprom(). The device is supposed to provide the same length back to the driver. But yes, it's possible (like shown in the report) to alter the value to something that causes a crash/panic due to overrun. This patch addresses the issue by adding the size to the common device context, so p54_rx_eeprom_readback no longer relies on possibly tampered values... That said, it also checks if the "firmware" altered the value and no longer copies them. The one, small saving grace is: Before the driver tries to read the eeprom, it needs to upload >a< firmware. the vendor firmware has a proprietary license and as a reason, it is not present on most distributions by default. The Linux kernel CVE team has assigned CVE-2025-38348 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 5.4.295 with commit 12134f79e53eb56b0b0b7447fa0c512acf6a8422 Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 5.10.239 with commit 9701f842031b825e2fd5f22d064166f8f13f6e4d Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 5.15.186 with commit 1f7f8168abe8cbe845ab8bb557228d44784a6b57 Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 6.1.142 with commit f39b2f8c1549a539846e083790fad396ef6cd802 Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 6.6.95 with commit 0e4dc150423b829c35cbcf399481ca11594fc036 Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 6.12.35 with commit 6d05390d20f110de37d051a3e063ef0a542d01fb Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 6.15.4 with commit 714afb4c38edd19a057d519c1f9c5d164b43de94 Issue introduced in 2.6.28 with commit 7cb770729ba895f73253dfcd46c3fcba45d896f9 and fixed in 6.16-rc1 with commit da1b9a55ff116cb040528ef664c70a4eec03ae99 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-38348 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/wireless/intersil/p54/fwio.c drivers/net/wireless/intersil/p54/p54.h drivers/net/wireless/intersil/p54/txrx.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/12134f79e53eb56b0b0b7447fa0c512acf6a8422 https://git.kernel.org/stable/c/9701f842031b825e2fd5f22d064166f8f13f6e4d https://git.kernel.org/stable/c/1f7f8168abe8cbe845ab8bb557228d44784a6b57 https://git.kernel.org/stable/c/f39b2f8c1549a539846e083790fad396ef6cd802 https://git.kernel.org/stable/c/0e4dc150423b829c35cbcf399481ca11594fc036 https://git.kernel.org/stable/c/6d05390d20f110de37d051a3e063ef0a542d01fb https://git.kernel.org/stable/c/714afb4c38edd19a057d519c1f9c5d164b43de94 https://git.kernel.org/stable/c/da1b9a55ff116cb040528ef664c70a4eec03ae99