CVE-2024-50013: exfat: fix memory leak in exfat_load_bitmap()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
exfat: fix memory leak in exfat_load_bitmap()
If the first directory entry in the root directory is not a bitmap directory entry, 'bh' will not be released and reassigned, which will cause a memory leak.
The Linux kernel CVE team has assigned CVE-2024-50013 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 5.10.227 with commit f692160d3e1e Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 5.15.168 with commit ddf704c2ce3b Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 6.1.113 with commit 4e1813e52f86 Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 6.6.55 with commit bf0b3b352594 Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 6.10.14 with commit dca359db1eb3 Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 6.11.3 with commit 89081e8407e6 Issue introduced in 5.7 with commit 1e49a94cf707 and fixed in 6.12-rc1 with commit d2b537b3e533
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-2024-50013
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:
fs/exfat/balloc.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/f692160d3e1e5450605071b8df8f7d08d9b09a83 https://git.kernel.org/stable/c/ddf704c2ce3b73f38d2dd8cf1bb0f7ec038bdf63 https://git.kernel.org/stable/c/4e1813e52f86eb8db0c6c9570251f2fcbc571f5d https://git.kernel.org/stable/c/bf0b3b35259475d1fe377bcaa565488e26684f7a https://git.kernel.org/stable/c/dca359db1eb37f334267ebd7e3cab9a66d191d5b https://git.kernel.org/stable/c/89081e8407e637463db5880d168e3652fb9f4330 https://git.kernel.org/stable/c/d2b537b3e533f28e0d97293fe9293161fe8cd137