CVE-2022-49419

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
26/02/2025
Last modified:
24/03/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup<br /> <br /> Commit b3c9a924aab6 ("fbdev: vesafb: Cleanup fb_info in .fb_destroy rather<br /> than .remove") fixed a use-after-free error due the vesafb driver freeing<br /> the fb_info in the .remove handler instead of doing it in .fb_destroy.<br /> <br /> This can happen if the .fb_destroy callback is executed after the .remove<br /> callback, since the former tries to access a pointer freed by the latter.<br /> <br /> But that change didn&amp;#39;t take into account that another possible scenario is<br /> that .fb_destroy is called before the .remove callback. For example, if no<br /> process has the fbdev chardev opened by the time the driver is removed.<br /> <br /> If that&amp;#39;s the case, fb_info will be freed when unregister_framebuffer() is<br /> called, making the fb_info pointer accessed in vesafb_remove() after that<br /> to no longer be valid.<br /> <br /> To prevent that, move the expression containing the info-&gt;par to happen<br /> before the unregister_framebuffer() function call.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15.41 (including) 5.15.46 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.17.9 (including) 5.17.14 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.18 (including) 5.18.3 (excluding)