CVE-2022-49881
kernel: wifi: cfg80211: fix memory leak in query_regdb_file()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · May 1, 2025
Updated · June 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
wifi: cfg80211: fix memory leak in query_regdb_file()
In the function query_regdb_file() the alpha2 parameter is duplicated using kmemdup() and subsequently freed in regdb_fw_cb(). However, request_firmware_nowait() can fail without calling regdb_fw_cb() and thus leak memory.
Statement
A memory leak was fixed in query_regdb_file() where kmemdup()'ed memory for the alpha2 parameter was not freed if request_firmware_nowait() failed before invoking the callback. The issue was resolved by explicitly calling kfree(alpha2) when the firmware request fails synchronously. Since access to this function requires capabilities like CAP_NET_ADMIN or direct kernel interaction, the Privileges Required metric is rated High (PR:H).
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE not specified