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 EE5971E765B for ; Thu, 7 Nov 2024 09:36:13 +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=1730972174; cv=none; b=COY1uw68+B5E8TBqGjLm8T5rYogzyZbVjcbkHnYP6Ky6fHMUpCkfdPhnTaG5kdUSh1a32eq0pe9HPsxTm14RGe+QZXW33KKuLJyeUQ7b1S2LLlBRilnIb4eo9k4IzS9wFwz2EkctVGaTzjmTB/YzQWdkgbgBjOB25fqIAAXonXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730972174; c=relaxed/simple; bh=m7E2Gd6fsZO6LD3SgUD/PJwtlRUFtcgW0bzxoFf5vQw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cxTduLLMaZxn3KsdIApZLYfnSPatvbGgONrT+PfOPJHqKYakqez3fs/RDfH3UBqXAoLsP4y0m6I7UqOFWQjplbXsCPop+iDmvAb1NlrJ5JFPORuw55gjUq+hxpZ+v7cuOwIQvgWJNd9iEFjPYrFQ2SuFWciJFmXTzotgQ4RxRGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MVxK9qHo; 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="MVxK9qHo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27BBAC4CECC; Thu, 7 Nov 2024 09:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730972173; bh=m7E2Gd6fsZO6LD3SgUD/PJwtlRUFtcgW0bzxoFf5vQw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MVxK9qHo59ucdDRDVtC280amgNmb0gJJNHiQ5uiS5uS9f2V0caXe0Gjlx4KvXYetx 5euz6OXfHKJSlIVT29Gfcz2/nkcC8TxcpFW7iSbsgE3Vh77nPGAsB8NeqPjFdbub0I IMgMIp8uG4Jbc55Rc7UIZPrdtoAV6ZT8mOzKL//o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50156: drm/msm: Avoid NULL dereference in msm_disp_state_print_regs() Date: Thu, 7 Nov 2024 10:34:56 +0100 Message-ID: <2024110746-CVE-2024-50156-6878@gregkh> X-Mailer: git-send-email 2.47.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=2845; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=m7E2Gd6fsZO6LD3SgUD/PJwtlRUFtcgW0bzxoFf5vQw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk6ndumZHsLN2yXlCz9t/0Uyyf5z5MtNt0J+D5XXfTnk ekTf/jzd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEfIsZFpxhevhcWfwda4NQ /VzGR14eO8s/+jDMT/rVtqJ/kaP7wWyZ6fNyvhaXVUU9AgA= 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: drm/msm: Avoid NULL dereference in msm_disp_state_print_regs() If the allocation in msm_disp_state_dump_regs() failed then `block->state` can be NULL. The msm_disp_state_print_regs() function _does_ have code to try to handle it with: if (*reg) dump_addr = *reg; ...but since "dump_addr" is initialized to NULL the above is actually a noop. The code then goes on to dereference `dump_addr`. Make the function print "Registers not stored" when it sees a NULL to solve this. Since we're touching the code, fix msm_disp_state_print_regs() not to pointlessly take a double-pointer and properly mark the pointer as `const`. Patchwork: https://patchwork.freedesktop.org/patch/619657/ The Linux kernel CVE team has assigned CVE-2024-50156 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 98659487b845 and fixed in 5.15.170 with commit 42cf045086fe Issue introduced in 5.14 with commit 98659487b845 and fixed in 6.1.115 with commit e8e9f2a12a62 Issue introduced in 5.14 with commit 98659487b845 and fixed in 6.6.59 with commit f7ad91627348 Issue introduced in 5.14 with commit 98659487b845 and fixed in 6.11.6 with commit 563aa81fd66a Issue introduced in 5.14 with commit 98659487b845 and fixed in 6.12-rc4 with commit 293f53263266 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-2024-50156 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/gpu/drm/msm/disp/msm_disp_snapshot_util.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/42cf045086feae77b212f0f66e742b91a5b566b7 https://git.kernel.org/stable/c/e8e9f2a12a6214080c8ea83220a596f6e1dedc6c https://git.kernel.org/stable/c/f7ad916273483748582d97cfa31054ccb19224f3 https://git.kernel.org/stable/c/563aa81fd66a4e7e6e551a0e02bcc23957cafe2f https://git.kernel.org/stable/c/293f53263266bc4340d777268ab4328a97f041fa