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 9071E295DA6 for ; Wed, 18 Jun 2025 11:16:38 +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=1750245398; cv=none; b=D0gk9kq/HVhvOEkdeGgR4YveGU8DOK7YYALsiEDwqg5fy5Wh2MTGbGesYSxmm0rMYRglAEotVyJoHt854IeI9fdKKP7mAMX4XS1Xab+NsmUd8KVaKc9nbmqKfnTsab4Swf50o0STGQYIpuJcC/yEXkONQ5n2lrDZvmDkApw3kXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245398; c=relaxed/simple; bh=DJnzcQK360T1KgRlmFR4U5jThUf/sBTqP6KnNOF05cc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i64WaU+Gldt9/eB0iPfsVJ61PbptpwAUayLkNq6WOFvjjB2eOSQE6Fj+DpINmXbYyJ3ZMg4ArIL8Q/JMgvWufhEJjDVpgCYtkh7wJPCw27s903d4MKom8npiqPJguh6tt72vQoGeSnFA8x+WTH2NXhZfBtWOBFvUGa1ozyiFtH4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=atTRIC1z; 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="atTRIC1z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E47D8C4CEE7; Wed, 18 Jun 2025 11:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245398; bh=DJnzcQK360T1KgRlmFR4U5jThUf/sBTqP6KnNOF05cc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=atTRIC1zXrNLjoWcSx9vk4ij5B68zoKJEai687oh5ZfD+SaX8uOIu54JQ1RW51RBi 2jNN1FaH8YxXwHivjd9gvj0F7+rGYnpzPU/YLxMtxaBEJOvQC6suxrRPuL1Zsxhu6s eUXHzRXMnT2Fq4LYAVBzNHq1OR5ZCMdKbPc/L4dY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50221: drm/fb-helper: Fix out-of-bounds access Date: Wed, 18 Jun 2025 13:04:46 +0200 Message-ID: <2025061847-CVE-2022-50221-1b80@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=2479; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=62NbbdhQOc7Yd7XX/nXGFpp+WLsN4EI3aUOdtAF+KDc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc2bL6aU9aF92ylxW6xRT3TnfImvlDy8Eagp36DI5b 336kHt5RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyE5TbDgjUKPzUNanuylq6z cLeaftVkxq3TtxjmF6WJPf+6Jpn7peeSBUw7dR3nMH27AgA= 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/fb-helper: Fix out-of-bounds access Clip memory range to screen-buffer size to avoid out-of-bounds access in fbdev deferred I/O's damage handling. Fbdev's deferred I/O can only track pages. From the range of pages, the damage handler computes the clipping rectangle for the display update. If the fbdev screen buffer ends near the beginning of a page, that page could contain more scanlines. The damage handler would then track these non-existing scanlines as dirty and provoke an out-of-bounds access during the screen update. Hence, clip the maximum memory range to the size of the screen buffer. While at it, rename the variables min/max to min_off/max_off in drm_fb_helper_deferred_io(). This avoids confusion with the macros of the same name. The Linux kernel CVE team has assigned CVE-2022-50221 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 67b723f5b74254d27962b1b59bddfee1584575ff and fixed in 5.19.2 with commit 9c49ac792c639dbec0728b513329a32461f72253 Issue introduced in 5.18 with commit 67b723f5b74254d27962b1b59bddfee1584575ff and fixed in 6.0 with commit ae25885bdf59fde40726863c57fd20e4a0642183 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-50221 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/drm_fb_helper.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/9c49ac792c639dbec0728b513329a32461f72253 https://git.kernel.org/stable/c/ae25885bdf59fde40726863c57fd20e4a0642183