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 CFA771624E0 for ; Wed, 26 Feb 2025 02:15:42 +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=1740536142; cv=none; b=F6RqfR5pGOREd9YywkGgxhx6Djd5QtXaPsEcxvcc1eafFycE5uSqmHyKzU1IVgSYgp2kJIjAI7xgjbohcOJSBzgpLA0sKxVWLOSfBGNJeneWAbiqz5FFsRzoEK/SGhotRjjxL0sLHugm8o3fcRBbIQETH4n19D2CosQNR++KoKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536142; c=relaxed/simple; bh=PAPj3P/yGSlD4UuZXnKMrNDTlwN8b2mUkiulB6sGFx4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nVeV5673n4BKihHsjLtgEqNII3M2AfAuCMtPAyp6ulQ8+iD6J3hIyeYTsli9BHpSjh4yXZ4B+XiOcW5IPxdhVaKXk/q3H54ufSXyCrHhKx+h3IN+2T4cHb3HtI+a2CmPEr3tCK4xmvBv34byUCgMdsidO+GttFuvOIF2U89rJtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kvB/gDSL; 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="kvB/gDSL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3F52C4CEDD; Wed, 26 Feb 2025 02:15:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536142; bh=PAPj3P/yGSlD4UuZXnKMrNDTlwN8b2mUkiulB6sGFx4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kvB/gDSLzE5JckvAERKFYdXJkX03e16X5ryo9PwINPYv1KHrfI6DZeuJoefp3MGaY rSBTTfBmXRxZRgkw1F+DlDMDuLuf1H7QL4FEupvd+tt1RIeOKK522H9SU/0Jtka1Of bu6XnxXyRPb4PcXrCJBwoCM8+Gygvi57AC9bN5Fc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49551: usb: isp1760: Fix out-of-bounds array access Date: Wed, 26 Feb 2025 03:13:45 +0100 Message-ID: <2025022616-CVE-2022-49551-4fc9@gregkh> X-Mailer: git-send-email 2.48.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=3237; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PAPj3P/yGSlD4UuZXnKMrNDTlwN8b2mUkiulB6sGFx4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7KjhE17RdifS1tbzIEJC9em8T97brP9bduxdwj8O2d vpfx/uBHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRpGiGBRMPLlwlOOVVy6Nb F14aSd6+5bMlyIBhJuMd/99PUg9w++cWq7zcy1CnsWJVMQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: usb: isp1760: Fix out-of-bounds array access Running the driver through kasan gives an interesting splat: BUG: KASAN: global-out-of-bounds in isp1760_register+0x180/0x70c Read of size 20 at addr f1db2e64 by task swapper/0/1 (...) isp1760_register from isp1760_plat_probe+0x1d8/0x220 (...) This happens because the loop reading the regmap fields for the different ISP1760 variants look like this: for (i = 0; i < HC_FIELD_MAX; i++) { ... } Meaning it expects the arrays to be at least HC_FIELD_MAX - 1 long. However the arrays isp1760_hc_reg_fields[], isp1763_hc_reg_fields[], isp1763_hc_volatile_ranges[] and isp1763_dc_volatile_ranges[] are dynamically sized during compilation. Fix this by putting an empty assignment to the [HC_FIELD_MAX] and [DC_FIELD_MAX] array member at the end of each array. This will make the array one member longer than it needs to be, but avoids the risk of overwriting whatever is inside [HC_FIELD_MAX - 1] and is simple and intuitive to read. Also add comments explaining what is going on. The Linux kernel CVE team has assigned CVE-2022-49551 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.15.46 with commit bf2558bbdce3ab1d6bcba09f354914e4515d0a2b Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.17.14 with commit 47d39cb57e8669e507d17d9e0d067d2b3e3a87ae Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.18.3 with commit 463bddd3ff1acf4036ddb80c34a715eb99debf46 Issue introduced in 5.14 with commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 and fixed in 5.19 with commit 26ae2c942b5702f2e43d36b2a4389cfb7d616b6a 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-2022-49551 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/usb/isp1760/isp1760-core.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/bf2558bbdce3ab1d6bcba09f354914e4515d0a2b https://git.kernel.org/stable/c/47d39cb57e8669e507d17d9e0d067d2b3e3a87ae https://git.kernel.org/stable/c/463bddd3ff1acf4036ddb80c34a715eb99debf46 https://git.kernel.org/stable/c/26ae2c942b5702f2e43d36b2a4389cfb7d616b6a