{"id":"CVE-2026-98523","summary":"drm/client: fix restore of partially initialized client","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/client: fix restore of partially initialized client\n\nI got a null-ptr-deref report when closing a DRM file descriptor:\n\nWARNING: drivers/gpu/drm/drm_atomic.c:2031 at\n__drm_atomic_helper_set_config+0x18e/0x1b0 [drm]\n\nCall Trace:\ndrm_client_modeset_commit_atomic+0x16b/0x220 [drm]\ndrm_client_modeset_commit_locked+0x56/0x160 [drm]\ndrm_client_modeset_commit+0x21/0x40 [drm]\n__drm_fb_helper_restore_fbdev_mode_unlocked.part.0+0x7b/0x80\ndrm_fbdev_client_restore+0xe/0x20 [drm_client_lib]\ndrm_client_dev_restore+0x9f/0xc0 [drm]\ndrm_release+0xc5/0xe0 [drm]\n\nThe warning is followed by a NULL pointer dereference:\n\nBUG: kernel NULL pointer dereference, address: 0000000000000008\n\nRIP:\n__drm_fb_helper_restore_fbdev_mode_unlocked.part.0+0x41/0x80\n[drm_kms_helper]\n\nCall Trace:\ndrm_fbdev_client_restore+0xe/0x20 [drm_client_lib]\ndrm_client_dev_restore+0x9f/0xc0 [drm]\ndrm_release+0xc5/0xe0 [drm]\n__fput+0xdc/0x2b0\n__x64_sys_close+0x39/0x80\ndo_syscall_64+0x8d/0x460\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\n\ndrm_client_register() adds the DRM client to the device client list\nbefore invoking the initial hotplug callback. If the hotplug callback\nfails, the client remains registered.\n\nFor the fbdev client, a failure during drm_fb_helper_initial_config()\ncauses the partially initialized fbdev helper to be cleaned up.\ndrm_fb_helper_fini() releases fb_helper-\u003einfo and leaves it NULL.\n\nThe fbdev client therefore remains registered even though there is no\nfully initialized framebuffer device.\n\nLater, when userspace closes the DRM file descriptor, drm_release()\ncan invoke the restore callbacks of registered DRM clients:\n\ndrm_release()\ndrm_client_dev_restore()\ndrm_fbdev_client_restore()\ndrm_fb_helper_restore_fbdev_mode_unlocked()\n\ndrm_fbdev_client_restore() currently restores the fbdev state\nunconditionally. For a partially initialized fbdev client this can\nsubmit an incomplete modeset state and subsequently access fbdev\nstate which has not been initialized, resulting in the warning and\nNULL pointer dereference above.\n\ndrm_fbdev_client_unregister() already uses fb_helper-\u003einfo to\ndistinguish a fully probed framebuffer device from a partially\ninitialized client.\n\nUse the same condition in drm_fbdev_client_restore() and skip restore\nif no framebuffer device has been successfully initialized.","modified":"2026-10-19T02:46:26.430503006Z","published":"2026-10-18T15:17:40.598Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98523.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/11edd5b6735d2e1069ddce672b1836713647f7fb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1fca688e9443003e33cf30453e7a7560367656c9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a69c4b678db808c0d89abb8cedeaaac38d1ef182"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fcbedba553a9c430079ee225df2dc7ab556a2f83"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98523.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98523"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7f5535fcbba2ce7f1908ee7e5c350032a4b1e9d0"},{"fixed":"11edd5b6735d2e1069ddce672b1836713647f7fb"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5d08c44e47b9d41366714552bdd374ac4b595591"},{"fixed":"fcbedba553a9c430079ee225df2dc7ab556a2f83"},{"fixed":"a69c4b678db808c0d89abb8cedeaaac38d1ef182"},{"fixed":"1fca688e9443003e33cf30453e7a7560367656c9"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6.12.19"},{"fixed":"6.12.112"}]}],"versions":["v6.12.111","v6.12.110","v6.12.109","v6.12.108","v6.12.107","v6.12.106","v6.12.105","v6.12.104","v6.12.103","v6.12.102","v6.12.101","v6.12.100","v6.12.99","v6.12.98","v6.12.97","v6.12.96","v6.12.95","v6.12.94","v6.12.93","v6.12.92","v6.12.91","v6.12.90","v6.12.89","v6.12.88","v6.12.87","v6.12.86","v6.12.85","v6.12.84","v6.12.83","v6.12.82","v6.12.81","v6.12.80","v6.12.79","v6.12.78","v6.12.77","v6.12.76","v6.12.75","v6.12.74","v6.12.73","v6.12.72","v6.12.71","v6.12.70","v6.12.69","v6.12.68","v6.12.67","v6.12.66","v6.12.65","v6.12.64","v6.12.63","v6.12.62","v6.12.61","v6.12.60","v6.12.59","v6.12.58","v6.12.57","v6.12.56","v6.12.55","v6.12.54","v6.12.53","v6.12.52","v6.12.51","v6.12.50","v6.12.49","v6.12.48","v6.12.47","v6.12.46","v6.12.45","v6.12.44","v6.12.43","v6.12.42","v6.12.41","v6.12.40","v6.12.39","v6.12.38","v6.12.37","v6.12.36","v6.12.35","v6.12.34","v6.12.33","v6.12.32","v6.12.31","v6.12.30","v6.12.29","v6.12.28","v6.12.27","v6.12.26","v6.12.25","v6.12.24","v6.12.23","v6.12.22","v6.12.21","v6.12.20","v6.12.19"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98523.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.12.112"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.55"},{"fixed":"7.2.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98523.json"}}],"schema_version":"1.9.0"}