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 D874F3375AA for ; Mon, 15 Sep 2025 14:51:43 +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=1757947903; cv=none; b=pBUKBkTLcoArLmnYV/Z3n6tjrzX64AuzdUpMbHSpj4UVz1qFsi08njTmmWYHBsJDCihUaorbmfz1WeE44I/IEz/2n02NQoXCwAm1z1T3FQt9B+MAlhAnMaAeK300pn2ls18/3WxGTIKCQYJq6G7ZtzhMu/B6gGnYINtevmo0JUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947903; c=relaxed/simple; bh=CE2vqZB9An0/swsyf+4KypFprtj61nqkGjgGwneokHg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k23NUrWEy/AG/tbq96TlL1U4MXf1uQVbSJC5ZECemoG+/cUoJYCkYKo9wGoAbP8/9gUdbuFYra+sKFHjgRuri0tRCC16kzK6HEjyQCEUrdgQKuDXwSot9JNo+rzXenizpoN7V0iuxtil6kc/1xkjdnQeitQ8Zl2PNxZNqxAgsew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tM4Obine; 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="tM4Obine" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAE58C4CEF7; Mon, 15 Sep 2025 14:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947903; bh=CE2vqZB9An0/swsyf+4KypFprtj61nqkGjgGwneokHg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tM4ObineolnWvq+jDjgin5Ya6jlqUe0SOOziZGB+JOfd7MuRMTYKEbxKKfg6T9fkf DZVIU+GwfE4Rw0zyoQvlI00sFC5yahbIcmFCXc6TIG6btFLx0VDVIVVyhKjgwaM/HZ jnW9HaNVS618pOQN40FtD5dE9oh8dk9/+GQWLf8M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50332: video/aperture: Call sysfb_disable() before removing PCI devices Date: Mon, 15 Sep 2025 16:49:09 +0200 Message-ID: <2025091555-CVE-2022-50332-a052@gregkh> X-Mailer: git-send-email 2.51.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=4405; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=82pxaUIEOjt+NLTWDKHrltubYxp4t7G0QANSB1ir5lM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1MPrY++8PiMeU9S1fEn883tBB2vWZrMlTpo/Z9adl 9MX81SwdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEVkkxzPc7lHaW745NxDLT QO01DGvWlqm97GCYyRh0yOhFjhPT7s2/86ff0e9SyrSvBAA= 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: video/aperture: Call sysfb_disable() before removing PCI devices Call sysfb_disable() from aperture_remove_conflicting_pci_devices() before removing PCI devices. Without, simpledrm can still bind to simple-framebuffer devices after the hardware driver has taken over the hardware. Both drivers interfere with each other and results are undefined. Reported modesetting errors [1] are shown below. ---- snap ---- rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 7 jiffies s: 165 root: 0x2000/. rcu: blocking rcu_node structures (internal RCU debug): Task dump for CPU 13: task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x00000008 Call Trace: ? commit_tail+0xd7/0x130 ? drm_atomic_helper_commit+0x126/0x150 ? drm_atomic_commit+0xa4/0xe0 ? drm_plane_get_damage_clips.cold+0x1c/0x1c ? drm_atomic_helper_dirtyfb+0x19e/0x280 ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 ? drm_ioctl_kernel+0xc4/0x150 ? drm_ioctl+0x246/0x3f0 ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 ? __x64_sys_ioctl+0x91/0xd0 ? do_syscall_64+0x60/0xd0 ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 ... rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 30 jiffies s: 169 root: 0x2000/. rcu: blocking rcu_node structures (internal RCU debug): Task dump for CPU 13: task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x0000400e Call Trace: ? memcpy_toio+0x76/0xc0 ? memcpy_toio+0x1b/0xc0 ? drm_fb_memcpy_toio+0x76/0xb0 ? drm_fb_blit_toio+0x75/0x2b0 ? simpledrm_simple_display_pipe_update+0x132/0x150 ? drm_atomic_helper_commit_planes+0xb6/0x230 ? drm_atomic_helper_commit_tail+0x44/0x80 ? commit_tail+0xd7/0x130 ? drm_atomic_helper_commit+0x126/0x150 ? drm_atomic_commit+0xa4/0xe0 ? drm_plane_get_damage_clips.cold+0x1c/0x1c ? drm_atomic_helper_dirtyfb+0x19e/0x280 ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 ? drm_ioctl_kernel+0xc4/0x150 ? drm_ioctl+0x246/0x3f0 ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 ? __x64_sys_ioctl+0x91/0xd0 ? do_syscall_64+0x60/0xd0 ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 The problem was added by commit 5e0137612430 ("video/aperture: Disable and unregister sysfb devices via aperture helpers") to v6.0.3 and does not exist in the mainline branch. The mainline commit 5e0137612430 ("video/aperture: Disable and unregister sysfb devices via aperture helpers") has been backported from v6.0-rc1 to stable v6.0.3 from a larger patch series [2] that reworks fbdev framebuffer ownership. The backport misses a change to aperture_remove_conflicting_pci_devices(). Mainline itself is fine, because the function does not exist there as a result of the patch series. Instead of backporting the whole series, fix the additional function. The Linux kernel CVE team has assigned CVE-2022-50332 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0.3 with commit cfecfc98a78d97a49807531b5b224459bda877de and fixed in 6.0.6 with commit 25a6688f27ff54f97adf7cce1d7e18c38bf51eb4 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-50332 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/video/aperture.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/25a6688f27ff54f97adf7cce1d7e18c38bf51eb4