drm/fb-helper: defer setup when fbdev_probe() fails, not just on -EAGAIN
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.113, 6.18.57, 7.2.11
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/fb-helper: defer setup when fbdev_probe() fails, not just on -EAGAIN __drm_fb_helper_initial_config_and_unlock() calls drm_client_modeset_probe() first, which already fills in each mode_set->mode/num_connectors for every connected output, and only afterwards calls drm_fb_helper_single_fb_probe() to create fb_helper->fb and wire it into those mode_sets via drm_setup_crtcs_fb(). If drm_fb_helper_single_fb_probe() fails with anything other than -EAGAIN (e.g. dev->driver->fbdev_probe() itself fails), the function bails out before drm_setup_crtcs_fb() runs and before setting fb_helper->deferred_setup. The client is left with mode_sets that have a mode and connectors but mode_set->fb == NULL, and nothing marks this fb_helper as needing a retry. __drm_fb_helper_restore_fbdev_mode_unlocked() only skips committing when fb_helper->deferred_setup is set, so a later .restore() call (drm_lastclose() on process exit, in this report) commits the stale mode_set through drm_client_modeset_commit() -> drm_client_modeset_commit_atomic() -> __drm_atomic_helper_set_config(), which hits WARN_ON(!set->fb). Mark fb_helper->deferred_setup on any drm_fb_helper_single_fb_probe() failure, not just -EAGAIN, so restore keeps skipping the commit until a later hotplug event successfully re-probes and re-populates mode_set->fb. The real error code is still returned to the caller unchanged.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- Linux Linux
From ca91a2758fcef6635626993557dd51cfbb6dd134 · fixed in 4a2006c675758f0c765b36fec6b49d17e89159cf; From ca91a2758fcef6635626993557dd51cfbb6dd134 · fixed in 3b303696f61461b3569019d7fcac6a646652b2b4; From ca91a2758fcef6635626993557dd51cfbb6dd134 · fixed in 4e7b508c7c60dec7a86b7eb2a1b7e6d174afa457; From ca91a2758fcef6635626993557dd51cfbb6dd134 · fixed in d510ed273854177f0a3ed330145858b2fe667f81; From ca91a2758fcef6635626993557dd51cfbb6dd134 · fixed in 755c94d178b7e972bb766199d34e4ba4f63a89eb
- Linux Linux
4.14
- KernelLinux
From 4.14.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.113; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.11