Vulnerability · Published May 1, 2025 · Assigned by Linux
CVE-2022-49802ftrace: Fix null pointer dereference in ftrace_add_mod()
Medium 5.5
In plain English
A medium-severity security flaw 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 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: ftrace: Fix null pointer dereference in ftrace_add_mod() The @ftrace_mod is allocated by kzalloc(), so both the members {prev,next} of @ftrace_mode->list are NULL, it's not a valid state to call list_del(). If kstrdup() for @ftrace_mod->{func|module} fails, it goes to @out_free tag and calls free_ftrace_mod() to destroy @ftrace_mod, then list_del() will write prev->next and next->prev, where null pointer dereference happens. BUG: kernel NULL pointer dereference, address: 0000000000000008 Oops: 0002 [#1] PREEMPT SMP NOPTI Call Trace: <TASK> ftrace_mod_callback+0x20d/0x220 ? do_filp_open+0xd9/0x140 ftrace_process_regex.isra.51+0xbf/0x130 ftrace_regex_write.isra.52.part.53+0x6e/0x90 vfs_write+0xee/0x3a0 ? __audit_filter_op+0xb1/0x100 ? auditd_test_task+0x38/0x50 ksys_write+0xa5/0xe0 do_syscall_64+0x3a/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Kernel panic - not syncing: Fatal exception So call INIT_LIST_HEAD() to initialize the list member to fix this issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49802 |
| Debian:13 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49802 |
| Debian:14 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux | 5.15.0-67.74 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1031.35 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1034.41 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1034.41.1 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1030.37 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1028.33 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1016.21 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1026.29 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1026.31 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1029.34 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-67.74 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1023.23 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1030.36 | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1025.27 | UBUNTU-CVE-2022-49802 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49802 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49802 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before 665b4c6648bf2b91f69b33817f4321cf4c3cafe9673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before b5bfc61f541d3f092b13dedcfe000d86eb8e133c673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before f715f31559b82e3f75ce047fa476de63d8107584673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before 6a14828caddad0d989495a72af678adf60992704673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before 1bea037a1abb23a6729bef36a2265a4565f5ea77673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before 6e50eb4b1807017f6c2d5089064256ce2de8aef1673feb9d76ab3eddde7acfd94b206e321cfc90b9 – before 19ba6c8af9382c4c05dc6a0a79af3013b9a35cd0 |
| Linux | Linux | 4.13 |
References
- https://git.kernel.org/stable/c/665b4c6648bf2b91f69b33817f4321cf4c3cafe9
- https://git.kernel.org/stable/c/b5bfc61f541d3f092b13dedcfe000d86eb8e133c
- https://git.kernel.org/stable/c/f715f31559b82e3f75ce047fa476de63d8107584
- https://git.kernel.org/stable/c/6a14828caddad0d989495a72af678adf60992704
- https://git.kernel.org/stable/c/1bea037a1abb23a6729bef36a2265a4565f5ea77
- https://git.kernel.org/stable/c/6e50eb4b1807017f6c2d5089064256ce2de8aef1
- https://git.kernel.org/stable/c/19ba6c8af9382c4c05dc6a0a79af3013b9a35cd0