fbdev: clear fb_info->mode before deleting a videomode
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fbdev: clear fb_info->mode before deleting a videomode
fb_set_var() can delete a mode from info->modelist when userspace passes FB_ACTIVATE_INV_MODE through FBIOPUT_VSCREENINFO. The code checks that the mode being deleted is not the current info->var and that fbcon is not using it, but it does not check fb_info->mode.
fb_info->mode may still point into the modelist entry being deleted. If the entry is freed, later mode sysfs reads through show_mode() can dereference a stale pointer.
Clear fb_info->mode before calling fb_delete_videomode() when it matches the mode being removed.
From the CVE record · Linux
The Linux kernel fbdev code can leave fb_info->mode pointing to a freed videomode after local userspace requests its deletion through FBIOPUT_VSCREENINFO. A later mode sysfs read can dereference that stale pointer; no authentication requirement is specified.
Engineers running the Linux kernel should check whether their version includes the fbdev fix; affected versions are not specified.