Vulnerability · Published Sep 18, 2024 · Assigned by Linux
CVE-2024-46746HID: amd_sfh: free driver_data after destroying hid device
High 7.8
In plain English
A high-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 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: HID: amd_sfh: free driver_data after destroying hid device HID driver callbacks aren't called anymore once hid_destroy_device() has been called. Hence, hid driver_data should be freed only after the hid_destroy_device() function returned as driver_data is used in several callbacks. I observed a crash with kernel 6.10.0 on my T14s Gen 3, after enabling KASAN to debug memory allocation, I got this output: [ 13.050438] ================================================================== [ 13.054060] BUG: KASAN: slab-use-after-free in amd_sfh_get_report+0x3ec/0x530 [amd_sfh] [ 13.054809] psmouse serio1: trackpoint: Synaptics TrackPoint firmware: 0x02, buttons: 3/3 [ 13.056432] Read of size 8 at addr ffff88813152f408 by task (udev-worker)/479 [ 13.060970] CPU: 5 PID: 479 Comm: (udev-worker) Not tainted 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.063978] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.067860] Call Trace: [ 13.069383] input: TPPS/2 Synaptics TrackPoint as /devices/platform/i8042/serio1/input/input8 [ 13.071486] <TASK> [ 13.071492] dump_stack_lvl+0x5d/0x80 [ 13.074870] snd_hda_intel 0000:33:00.6: enabling device (0000 -> 0002) [ 13.078296] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.082199] print_report+0x174/0x505 [ 13.085776] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.089367] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.093255] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.097464] kasan_report+0xc8/0x150 [ 13.101461] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.105802] amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.110303] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.114879] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.119450] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.124097] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.127404] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.131925] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.136455] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.140197] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.143602] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.147234] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.150446] ? __devm_add_action+0x167/0x1d0 [ 13.155061] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.158581] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.161814] platform_probe+0xa2/0x150 [ 13.165029] really_probe+0x1e3/0x8a0 [ 13.168243] __driver_probe_device+0x18c/0x370 [ 13.171500] driver_probe_device+0x4a/0x120 [ 13.175000] __driver_attach+0x190/0x4a0 [ 13.178521] ? __pfx___driver_attach+0x10/0x10 [ 13.181771] bus_for_each_dev+0x106/0x180 [ 13.185033] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.188229] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.191446] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.194382] bus_add_driver+0x29e/0x4d0 [ 13.197328] driver_register+0x1a5/0x360 [ 13.200283] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.203362] do_one_initcall+0xa7/0x380 [ 13.206432] ? __pfx_do_one_initcall+0x10/0x10 [ 13.210175] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.213211] ? kasan_unpoison+0x44/0x70 [ 13.216688] do_init_module+0x238/0x750 [ 13.2196 ---truncated---
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.112-1 | DEBIAN-CVE-2024-46746 |
| Debian:13 | linux | 6.10.11-1 | DEBIAN-CVE-2024-46746 |
| Debian:14 | linux | 6.10.11-1 | DEBIAN-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux | 5.15.0-125.135 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux | 6.8.0-50.51 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1072.78 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1020.22 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1020.22~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1075.84 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1020.23 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1020.23~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1076.85.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1071.79 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1019.21 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1019.21~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1069.75 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1015.19 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1055.62 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1002.4 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-50.51~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1065.68 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1017.17 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1017.17~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1067.73 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1069.74 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-125.135 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-50.51.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-50.51.1~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1067.68 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1019.21 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1019.21~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1019.21.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1032.32 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1020.20 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1018.18 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1070.76 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1017.18 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1017.18~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1065.68 | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1016.18 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-50.51.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-50.51.1~22.04.1 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-46746 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-46746 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1038.42 | UBUNTU-CVE-2024-46746 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 4f567b9f8141a86c7d878fadf136e5d1408e3e61 – before 86b4f5cf91ca03c08e3822ac89476a677a780bcc4f567b9f8141a86c7d878fadf136e5d1408e3e61 – before 775125c7fe38533aaa4b20769f5b5e62cc1170a04f567b9f8141a86c7d878fadf136e5d1408e3e61 – before 60dc4ee0428d70bcbb41436b6729d29f1cbdfb894f567b9f8141a86c7d878fadf136e5d1408e3e61 – before adb3e3c1ddb5a23b8b7122ef1913f528d728937c4f567b9f8141a86c7d878fadf136e5d1408e3e61 – before 97155021ae17b86985121b33cf8098bcde00d497 |
| Linux | Linux | 5.11 |
References
- https://git.kernel.org/stable/c/86b4f5cf91ca03c08e3822ac89476a677a780bcc
- https://git.kernel.org/stable/c/775125c7fe38533aaa4b20769f5b5e62cc1170a0
- https://git.kernel.org/stable/c/60dc4ee0428d70bcbb41436b6729d29f1cbdfb89
- https://git.kernel.org/stable/c/adb3e3c1ddb5a23b8b7122ef1913f528d728937c
- https://git.kernel.org/stable/c/97155021ae17b86985121b33cf8098bcde00d497
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html