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 D9EC2170A11 for ; Wed, 18 Jun 2025 11:08:11 +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=1750244891; cv=none; b=nVSJSyvypuV3/+7gz/cObons/vHEceOHkp7CDZithL+vVZirIR1dCk9CyoBLoJYH+qNn664pPli4sAAnzBCzRs6qEZOByo0R07p3JCuyuUKZFEtKctF1+9pXQt/3AARoIlc+eGV7St7qCQlCaeUnvsVa/vTTxIpUw9oce6/iMGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244891; c=relaxed/simple; bh=AbXrtNJ8C0JN1+a/kNtAu78bwuw3sJaMyKKjSzdjCdA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IsW0+fN2fTgMfMrMRm13U4psYsmTNM0EyZTCf/LNwm8A8EBSpewA19/z6IWEvc0bes+24LFT6oGEHeMBYscj5iSsgfpeXJd4CN3NQAqgSEfGcCJhUDIjrG4eWTRedHN60T8CkLghySUGG2SR9NGwa2nqXDcTeSCIPFHQlWetoI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a4t/9cxt; 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="a4t/9cxt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B119C4CEE7; Wed, 18 Jun 2025 11:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244891; bh=AbXrtNJ8C0JN1+a/kNtAu78bwuw3sJaMyKKjSzdjCdA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=a4t/9cxtY34bjCp9xRYkBZxLRI3Hfqi6sndpeK/AOWUT104qbWybEaa9P5F/dEbBH lQg7p9kEnHMf4JW2JPgkNAAhQmNyXUR43WhLEEutQdaM0fEHjYBwGe6nVFi+Q1B0Sc ccPJysSD/Yp+7G+iZvYmhj2zIAC4UfLJn890xv/M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50036: drm/sun4i: dsi: Prevent underflow when computing packet sizes Date: Wed, 18 Jun 2025 13:01:41 +0200 Message-ID: <2025061840-CVE-2022-50036-7fdc@gregkh> X-Mailer: git-send-email 2.49.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=2632; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dgFL2zXpNcLvyxYSJHnh8PN09MDUpr6PCxVQId5kVZQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBcyLZPspeM36VoL510+11S25Pdw7YdNZSb5d/TFDEs znldtZLO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiunMYFqz5aXSnecNBcdYD 9jwNXovSqubO2MCwYOq6Jq2S6eefRbqK6Zz6eXxpd0t7AAA= 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: drm/sun4i: dsi: Prevent underflow when computing packet sizes Currently, the packet overhead is subtracted using unsigned arithmetic. With a short sync pulse, this could underflow and wrap around to near the maximal u16 value. Fix this by using signed subtraction. The call to max() will correctly handle any negative numbers that are produced. Apply the same fix to the other timings, even though those subtractions are less likely to underflow. The Linux kernel CVE team has assigned CVE-2022-50036 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit 133add5b5ad42b7bb5fcd59d681aef6475d08600 and fixed in 5.10.138 with commit a1e7908f78f5a7f53f8cd83c7dcdfec974c95f26 Issue introduced in 4.18 with commit 133add5b5ad42b7bb5fcd59d681aef6475d08600 and fixed in 5.15.63 with commit 98e28de472ef248352f04f87e29e634ebb0ec240 Issue introduced in 4.18 with commit 133add5b5ad42b7bb5fcd59d681aef6475d08600 and fixed in 5.19.4 with commit fb837f5b83461624e525727a8f4add14b201147e Issue introduced in 4.18 with commit 133add5b5ad42b7bb5fcd59d681aef6475d08600 and fixed in 6.0 with commit 82a1356a933d8443139f8886f11b63c974a09a67 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-50036 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/sun4i/sun6i_mipi_dsi.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/a1e7908f78f5a7f53f8cd83c7dcdfec974c95f26 https://git.kernel.org/stable/c/98e28de472ef248352f04f87e29e634ebb0ec240 https://git.kernel.org/stable/c/fb837f5b83461624e525727a8f4add14b201147e https://git.kernel.org/stable/c/82a1356a933d8443139f8886f11b63c974a09a67