CVE-2022-49419: video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup
In the Linux kernel, the following vulnerability has been resolved:
video: fbdev: vesafb: Fix a use-after-free due early fbinfo cleanup
Commit b3c9a924aab6 ("fbdev: vesafb: Cleanup fbinfo in .fbdestroy rather than .remove") fixed a use-after-free error due the vesafb driver freeing the fbinfo in the .remove handler instead of doing it in .fbdestroy.
This can happen if the .fbdestroy callback is executed after the .remove callback, since the former tries to access a pointer freed by the latter.
But that change didn't take into account that another possible scenario is that .fbdestroy is called before the .remove callback. For example, if no process has the fbdev chardev opened by the time the driver is removed.
If that's the case, fbinfo will be freed when unregisterframebuffer() is called, making the fbinfo pointer accessed in vesafbremove() after that to no longer be valid.
To prevent that, move the expression containing the info->par to happen before the unregisterframebuffer() function call.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.46 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.17.14 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.18.3 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.5-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49419?
CVE-2022-49419 has not been assigned a specific severity score, but it is classified as a use-after-free vulnerability which can lead to potential system exploitation.
How do I fix CVE-2022-49419?
To fix CVE-2022-49419, update your Linux Kernel to a version that incorporates the patch addressing this vulnerability.
Which versions of the Linux Kernel are affected by CVE-2022-49419?
CVE-2022-49419 affects Linux Kernel versions between 5.15.41 to 5.15.46, 5.17.9 to 5.17.14, and 5.18.0 to 5.18.3.
What component is associated with CVE-2022-49419?
CVE-2022-49419 is associated with the Linux framebuffer device (fbdev) specifically related to the vesafb driver.
What is the potential impact of CVE-2022-49419?
The potential impact of CVE-2022-49419 includes system crashes or exploiting the vulnerability to execute arbitrary code.