[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025022654-CVE-2022-49419-fc59@gregkh>
Date: Wed, 26 Feb 2025 03:11:33 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2022-49419: video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup
Commit b3c9a924aab6 ("fbdev: vesafb: Cleanup fb_info in .fb_destroy rather
than .remove") fixed a use-after-free error due the vesafb driver freeing
the fb_info in the .remove handler instead of doing it in .fb_destroy.
This can happen if the .fb_destroy 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 .fb_destroy 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, fb_info will be freed when unregister_framebuffer() is
called, making the fb_info pointer accessed in vesafb_remove() after that
to no longer be valid.
To prevent that, move the expression containing the info->par to happen
before the unregister_framebuffer() function call.
The Linux kernel CVE team has assigned CVE-2022-49419 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15.41 with commit f94aa46efaa087ec075c83e4508f943fb5e43977 and fixed in 5.15.46 with commit 0fac5f8fb1bc2fc4f8714bf5e743c9cc3f547c63
Issue introduced in 5.17.9 with commit a1aac13288de2935dc1a9330a93b1ac92f1e2b72 and fixed in 5.17.14 with commit f605f5558ecc175ec70016a3c15f007cb6386531
Issue introduced in 5.18 with commit b3c9a924aab61adbc29df110006aa03afe1a78ba and fixed in 5.18.3 with commit d260cad015945d1f4bb9b028a096f648506106a2
Issue introduced in 5.18 with commit b3c9a924aab61adbc29df110006aa03afe1a78ba and fixed in 5.19 with commit acde4003efc16480375543638484d8f13f2e99a3
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-49419
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/video/fbdev/vesafb.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/0fac5f8fb1bc2fc4f8714bf5e743c9cc3f547c63
https://git.kernel.org/stable/c/f605f5558ecc175ec70016a3c15f007cb6386531
https://git.kernel.org/stable/c/d260cad015945d1f4bb9b028a096f648506106a2
https://git.kernel.org/stable/c/acde4003efc16480375543638484d8f13f2e99a3
Powered by blists - more mailing lists