CVE-2022-49837
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/05/2025
Last modified:
01/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bpf: Fix memory leaks in __check_func_call<br />
<br />
kmemleak reports this issue:<br />
<br />
unreferenced object 0xffff88817139d000 (size 2048):<br />
comm "test_progs", pid 33246, jiffies 4307381979 (age 45851.820s)<br />
hex dump (first 32 bytes):<br />
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................<br />
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................<br />
backtrace:<br />
[] kmalloc_trace+0x27/0xa0<br />
[] __check_func_call+0x316/0x1230<br />
[] check_helper_call+0x172e/0x4700<br />
[] do_check+0x21d8/0x45e0<br />
[] do_check_common+0x767/0xaf0<br />
[] bpf_check+0x43e3/0x5bc0<br />
[] bpf_prog_load+0xf26/0x1940<br />
[] __sys_bpf+0xd2c/0x3650<br />
[] __x64_sys_bpf+0x75/0xc0<br />
[] do_syscall_64+0x3b/0x90<br />
[] entry_SYSCALL_64_after_hwframe+0x63/0xcd<br />
<br />
The root case here is: In function prepare_func_exit(), the callee is<br />
not released in the abnormal scenario after "state->curframe--;". To<br />
fix, move "state->curframe--;" to the very bottom of the function,<br />
right when we free callee and reset frame[] pointer to NULL, as Andrii<br />
suggested.<br />
<br />
In addition, function __check_func_call() has a similar problem. In<br />
the abnormal scenario before "state->curframe++;", the callee also<br />
should be released by free_func_state().
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.15.80 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.0.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



