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 92C95196C7C for ; Tue, 16 Jul 2024 11:14:01 +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=1721128441; cv=none; b=pDzajr45lm4cFGos3cL3wZC1TEUGokCVEnUuVGXHjWae0mVkNymqSj70APV0G3n8U6wwWGA3hgwVeFqIkL4qP6kUrmAowx/YuGty8Dxr5fJ6N5MmCJ03JR3zbNIs04T9/vb+3BGRHib5ODtA8B9rny+pw8okEt0I6pK2hrDvkG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721128441; c=relaxed/simple; bh=U8abbH3vttMExmj1+sBPHf0e97kTKIii/i/VX4QPrss=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bxyaXv/t1RRIXSrQGV6xU8oKtST5y2OCQ1Yv1UN1e0YlUQrM1scKLtuOKu6W4U6GWtQQ43HYhseA+cnbg9fATJNCv4bqXFFpGYVKfQxHbqUFORf4uo7Jga3QqRFubxXyMryY9aEhr3KqHqvwQw0rCiPc8sZI6r6pVQAyV1GXL6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1iPtRfl0; 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="1iPtRfl0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE00CC4AF0C; Tue, 16 Jul 2024 11:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721128441; bh=U8abbH3vttMExmj1+sBPHf0e97kTKIii/i/VX4QPrss=; h=From:To:Cc:Subject:Date:Reply-to:From; b=1iPtRfl0FJ85V3h5SPcno1rCOatqgF4cwiE00tV7NIBovDuBTPTin9rzWQX2YJA9t kXfVmunax2wQcmZ/4FNSKI/D+epcy0nYdDILhKSqDUTTWQh+D6UQzIoqIN2aOdD7Mu DrdabVwZY5kxaR3xQCn1b3EWGQGh1xY3l7pgcsK0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48777: mtd: parsers: qcom: Fix kernel panic on skipped partition Date: Tue, 16 Jul 2024 13:13:31 +0200 Message-ID: <2024071631-CVE-2022-48777-0e32@gregkh> X-Mailer: git-send-email 2.45.2 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=2281; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=U8abbH3vttMExmj1+sBPHf0e97kTKIii/i/VX4QPrss=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnTQu9c5D/iNFv9YthSFR6FmvSIVXperHoOb86mBkRZJ SbbS3/oiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIks+s4w3yf9eNeR49wC8x26 2s/9c9uxe/OFUwwLWlJeyr0XPX1/QoKqThOPlb+N/apgAA== 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: mtd: parsers: qcom: Fix kernel panic on skipped partition In the event of a skipped partition (case when the entry name is empty) the kernel panics in the cleanup function as the name entry is NULL. Rework the parser logic by first checking the real partition number and then allocate the space and set the data for the valid partitions. The logic was also fundamentally wrong as with a skipped partition, the parts number returned was incorrect by not decreasing it for the skipped partitions. The Linux kernel CVE team has assigned CVE-2022-48777 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 803eb124e1a6 and fixed in 5.15.25 with commit eb03cb6e03ff Issue introduced in 5.12 with commit 803eb124e1a6 and fixed in 5.16.11 with commit a2995fe23095 Issue introduced in 5.12 with commit 803eb124e1a6 and fixed in 5.17 with commit 65d003cca335 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-48777 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/mtd/parsers/qcomsmempart.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/eb03cb6e03ffd9173e18e5fe87e4e3ce83820453 https://git.kernel.org/stable/c/a2995fe23095ceda2dc382fbe057f5e164595548 https://git.kernel.org/stable/c/65d003cca335cabc0160d3cd7daa689eaa9dd3cd