Vulnerability · Published May 1, 2025 · Assigned by Linux
CVE-2022-49891tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
Medium 5.5
In plain English
A medium-severity memory leak in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd() test_gen_kprobe_cmd() only free buf in fail path, hence buf will leak when there is no failure. Move kfree(buf) from fail path to common path to prevent the memleak. The same reason and solution in test_gen_kretprobe_cmd(). unreferenced object 0xffff888143b14000 (size 2048): comm "insmod", pid 52490, jiffies 4301890980 (age 40.553s) hex dump (first 32 bytes): 70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70 p:kprobes/gen_kp 72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73 robe_test do_sys backtrace: [<000000006d7b836b>] kmalloc_trace+0x27/0xa0 [<0000000009528b5b>] 0xffffffffa059006f [<000000008408b580>] do_one_initcall+0x87/0x2a0 [<00000000c4980a7e>] do_init_module+0xdf/0x320 [<00000000d775aad0>] load_module+0x3006/0x3390 [<00000000e9a74b80>] __do_sys_finit_module+0x113/0x1b0 [<000000003726480d>] do_syscall_64+0x35/0x80 [<000000003441e93b>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.8-1 | DEBIAN-CVE-2022-49891 |
| Debian:13 | linux | 6.0.8-1 | DEBIAN-CVE-2022-49891 |
| Debian:14 | linux | 6.0.8-1 | DEBIAN-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux | 5.15.0-60.66 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1030.34 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1033.40 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1033.40.1 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1029.36 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1027.32 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1015.19 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1025.28 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1025.30 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1028.33 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-60.66 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1017.17 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1029.35 | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1024.26 | UBUNTU-CVE-2022-49891 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49891 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49891 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 64836248dda20c8e7427b493f7e06d9bf8f58850 – before bef08acbe560a926b4cee9cc46404cc98ae5703b64836248dda20c8e7427b493f7e06d9bf8f58850 – before d1b6a8e3414aeaa0985139180c145d2d0fbd2a4964836248dda20c8e7427b493f7e06d9bf8f58850 – before 71aeb8d01a8c7ab5cf7da3f81b35206f56ce6bca64836248dda20c8e7427b493f7e06d9bf8f58850 – before 66f0919c953ef7b55e5ab94389a013da2ce80a2c |
| Linux | Linux | 5.6 |
Weakness: CWE-401 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H