{"id":"CVE-2024-38572","state":"PUBLISHED","title":"wifi: ath12k: fix out-of-bound access of qmi_invoke_handler()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: ath12k: fix out-of-bound access of qmi_invoke_handler()\n\nCurrently, there is no terminator entry for ath12k_qmi_msg_handlers hence\nfacing below KASAN warning,\n\n ==================================================================\n BUG: KASAN: global-out-of-bounds in qmi_invoke_handler+0xa4/0x148\n Read of size 8 at addr ffffffd00a6428d8 by task kworker/u8:2/1273\n\n CPU: 0 PID: 1273 Comm: kworker/u8:2 Not tainted 5.4.213 #0\n Workqueue: qmi_msg_handler qmi_data_ready_work\n Call trace:\n  dump_backtrace+0x0/0x20c\n  show_stack+0x14/0x1c\n  dump_stack+0xe0/0x138\n  print_address_description.isra.5+0x30/0x330\n  __kasan_report+0x16c/0x1bc\n  kasan_report+0xc/0x14\n  __asan_load8+0xa8/0xb0\n  qmi_invoke_handler+0xa4/0x148\n  qmi_handle_message+0x18c/0x1bc\n  qmi_data_ready_work+0x4ec/0x528\n  process_one_work+0x2c0/0x440\n  worker_thread+0x324/0x4b8\n  kthread+0x210/0x228\n  ret_from_fork+0x10/0x18\n\n The address belongs to the variable:\n  ath12k_mac_mon_status_filter_default+0x4bd8/0xfffffffffffe2300 [ath12k]\n [...]\n ==================================================================\n\nAdd a dummy terminator entry at the end to assist the qmi_invoke_handler()\nin traversing up to the terminator entry without accessing an\nout-of-boundary index.\n\nTested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1","publishedAt":"2024-06-19T13:35:37.666Z","updatedAt":"2026-08-05T11:32:52.528Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"95575de7dede7b1ed3b9718dab9dda97914ea775","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"b48d40f5840c505b7af700594aa8379eec28e925","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"a1abdb63628b04855a929850772de97435ed1555","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"e1bdff48a1bb4a4ac660c19c55a820968c48b3f2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/qmi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/qmi.c"]}],"references":["https://git.kernel.org/stable/c/95575de7dede7b1ed3b9718dab9dda97914ea775","https://git.kernel.org/stable/c/b48d40f5840c505b7af700594aa8379eec28e925","https://git.kernel.org/stable/c/a1abdb63628b04855a929850772de97435ed1555","https://git.kernel.org/stable/c/e1bdff48a1bb4a4ac660c19c55a820968c48b3f2"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38572.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38572","state":"PUBLISHED","datePublished":"2024-06-19T13:35:37.666Z","dateUpdated":"2026-08-05T11:32:52.528Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-18T19:36:34.924Z"},"containers":{"cna":{"title":"wifi: ath12k: fix out-of-bound access of qmi_invoke_handler()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: ath12k: fix out-of-bound access of qmi_invoke_handler()\n\nCurrently, there is no terminator entry for ath12k_qmi_msg_handlers hence\nfacing below KASAN warning,\n\n ==================================================================\n BUG: KASAN: global-out-of-bounds in qmi_invoke_handler+0xa4/0x148\n Read of size 8 at addr ffffffd00a6428d8 by task kworker/u8:2/1273\n\n CPU: 0 PID: 1273 Comm: kworker/u8:2 Not tainted 5.4.213 #0\n Workqueue: qmi_msg_handler qmi_data_ready_work\n Call trace:\n  dump_backtrace+0x0/0x20c\n  show_stack+0x14/0x1c\n  dump_stack+0xe0/0x138\n  print_address_description.isra.5+0x30/0x330\n  __kasan_report+0x16c/0x1bc\n  kasan_report+0xc/0x14\n  __asan_load8+0xa8/0xb0\n  qmi_invoke_handler+0xa4/0x148\n  qmi_handle_message+0x18c/0x1bc\n  qmi_data_ready_work+0x4ec/0x528\n  process_one_work+0x2c0/0x440\n  worker_thread+0x324/0x4b8\n  kthread+0x210/0x228\n  ret_from_fork+0x10/0x18\n\n The address belongs to the variable:\n  ath12k_mac_mon_status_filter_default+0x4bd8/0xfffffffffffe2300 [ath12k]\n [...]\n ==================================================================\n\nAdd a dummy terminator entry at the end to assist the qmi_invoke_handler()\nin traversing up to the terminator entry without accessing an\nout-of-boundary index.\n\nTested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"95575de7dede7b1ed3b9718dab9dda97914ea775","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"b48d40f5840c505b7af700594aa8379eec28e925","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"a1abdb63628b04855a929850772de97435ed1555","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"e1bdff48a1bb4a4ac660c19c55a820968c48b3f2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/qmi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/qmi.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/95575de7dede7b1ed3b9718dab9dda97914ea775"},{"url":"https://git.kernel.org/stable/c/b48d40f5840c505b7af700594aa8379eec28e925"},{"url":"https://git.kernel.org/stable/c/a1abdb63628b04855a929850772de97435ed1555"},{"url":"https://git.kernel.org/stable/c/e1bdff48a1bb4a4ac660c19c55a820968c48b3f2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached by sending a datagram to the ath12k QMI handle's socket over the local AF_QIPCRTR (QRTR) IPC transport, which requires local system access. QMI is a host-to-firmware control channel and is not exposed to over-the-air or network peers.\nAC:L - The attacker fully controls the QMI header's type and msg_id fields, so simply sending any value not present in the 3-entry handler table deterministically walks past the array end; the destination ephemeral port range is only 0x4000-0x7fff and is trivially scanned. No race, timing, or uncontrollable precondition is involved.\nPR:L - qrtr_create() performs no capability check for AF_QIPCRTR/SOCK_DGRAM, qrtr_sendmsg() autobinds to an ephemeral port and delivers via the global (non-netns-scoped) qrtr_ports XArray, and qmi_handle_message() does no sender validation for non-response messages, so any unprivileged local user can reach it. Only binding below QRTR_MIN_EPH_SOCKET needs CAP_NET_ADMIN, which is not required here.\nUI:N - The attacker triggers the out-of-bounds access entirely on their own by sending a single crafted QMI datagram. No victim action is needed, and the bug also fires spontaneously on any unrecognized firmware indication.\nS:U - The out-of-bounds read, the resulting corruption, and the wild indirect call all occur within the kernel's own security authority on the same host. No hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The loop performs an unbounded out-of-bounds read that walks arbitrary module .rodata until it happens to find a slot with a NULL fn field, and the attacker steers which slot is selected via the type/msg_id he controls. Combined with the garbage qmi_elem_info pointer fed to qmi_decode_message(), this yields wild kernel memory reads well beyond a few bounded bytes.\nI:H - An attacker-selected out-of-bounds slot supplies a bogus ei pointer to qmi_decode_message(), whose qmi_decode() writes elem_len * elem_size bytes at c_struct + ei->offset — an out-of-bounds heap write — and then calls handler->fn(), an indirect call through an unvalidated pointer read from out-of-bounds memory, giving a control-flow hijack primitive.\nA:H - The out-of-bounds walk can run off the end of the module mapping and the subsequent decode/indirect call through garbage pointers reliably oopses the kernel, as demonstrated by the KASAN global-out-of-bounds report in the fix commit. It is triggerable repeatedly from an unprivileged process."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:32:52.528Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.6.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.8.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.9.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/95575de7dede7b1ed3b9718dab9dda97914ea775","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/b48d40f5840c505b7af700594aa8379eec28e925","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a1abdb63628b04855a929850772de97435ed1555","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e1bdff48a1bb4a4ac660c19c55a820968c48b3f2","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:12:25.824Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-38572","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:14:15.867309Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:56.056Z"}}]}}}