{"id":"CVE-2025-39761","state":"PUBLISHED","title":"wifi: ath12k: Decrement TID on RX peer frag setup error handling","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: ath12k: Decrement TID on RX peer frag setup error handling\n\nCurrently, TID is not decremented before peer cleanup, during error\nhandling path of ath12k_dp_rx_peer_frag_setup(). This could lead to\nout-of-bounds access in peer->rx_tid[].\n\nHence, add a decrement operation for TID, before peer cleanup to\nensures proper cleanup and prevents out-of-bounds access issues when\nthe RX peer frag setup fails.\n\nFound during code review. Compile tested only.","publishedAt":"2025-09-11T16:52:29.788Z","updatedAt":"2026-08-05T12:05:01.054Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/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":"eb1e1526b82b8cf31f1ef9ca86a2647fb6cd89c6","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"7c3e99fd4a66a5ac9c7dd32db07359666efe0002","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"a3b73c72c42348bf1555fd2b00f32f941324b242","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"9530d666f4376c294cdf4348c29fe3542fec980a","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"7c0884fcd2ddde0544d2e77f297ae461e1f53f58","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/dp.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.103","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.43","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.11","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.2","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","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/dp.c"]}],"references":["https://git.kernel.org/stable/c/eb1e1526b82b8cf31f1ef9ca86a2647fb6cd89c6","https://git.kernel.org/stable/c/7c3e99fd4a66a5ac9c7dd32db07359666efe0002","https://git.kernel.org/stable/c/a3b73c72c42348bf1555fd2b00f32f941324b242","https://git.kernel.org/stable/c/9530d666f4376c294cdf4348c29fe3542fec980a","https://git.kernel.org/stable/c/7c0884fcd2ddde0544d2e77f297ae461e1f53f58"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39761.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39761","state":"PUBLISHED","datePublished":"2025-09-11T16:52:29.788Z","dateUpdated":"2026-08-05T12:05:01.054Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.126Z"},"containers":{"cna":{"title":"wifi: ath12k: Decrement TID on RX peer frag setup error handling","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: ath12k: Decrement TID on RX peer frag setup error handling\n\nCurrently, TID is not decremented before peer cleanup, during error\nhandling path of ath12k_dp_rx_peer_frag_setup(). This could lead to\nout-of-bounds access in peer->rx_tid[].\n\nHence, add a decrement operation for TID, before peer cleanup to\nensures proper cleanup and prevents out-of-bounds access issues when\nthe RX peer frag setup fails.\n\nFound during code review. Compile tested only."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"eb1e1526b82b8cf31f1ef9ca86a2647fb6cd89c6","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"7c3e99fd4a66a5ac9c7dd32db07359666efe0002","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"a3b73c72c42348bf1555fd2b00f32f941324b242","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"9530d666f4376c294cdf4348c29fe3542fec980a","versionType":"git"},{"version":"d889913205cf7ebda905b1e62c5867ed4e39f6c2","status":"affected","lessThan":"7c0884fcd2ddde0544d2e77f297ae461e1f53f58","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/ath/ath12k/dp.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.103","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.43","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.11","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.2","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","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/dp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/eb1e1526b82b8cf31f1ef9ca86a2647fb6cd89c6"},{"url":"https://git.kernel.org/stable/c/7c3e99fd4a66a5ac9c7dd32db07359666efe0002"},{"url":"https://git.kernel.org/stable/c/a3b73c72c42348bf1555fd2b00f32f941324b242"},{"url":"https://git.kernel.org/stable/c/9530d666f4376c294cdf4348c29fe3542fec980a"},{"url":"https://git.kernel.org/stable/c/7c0884fcd2ddde0544d2e77f297ae461e1f53f58"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The vulnerable path is entered from `ath12k_mac_station_add()` when a WiFi peer is added, which in AP/mesh mode is driven by a station within radio range sending Authentication/peering frames. This requires adjacency on the 802.11 link, not routable network access.\nAC:L - The attacker drives both the trigger and the failure condition — repeated association/deauthentication floods create the peer-unmap race that makes `ath12k_dp_rx_peer_frag_setup()` return -ENOENT, and the same flood (17 DMA queue buffers plus a peer struct per station, up to 2048 peers) creates the memory pressure that fails `crypto_alloc_shash()`. Both sides of the race are attacker-controlled, and the attempt can be repeated indefinitely at no cost.\nPR:N - In AP and mesh mode the `NOTEXIST -> NONE` sta_state transition occurs on receipt of an Authentication/peering frame, before the 4-way handshake verifies any credentials, so an unauthenticated station reaches `ath12k_dp_peer_setup()`. On open networks no credentials exist at all.\nUI:N - An attacking station associates with the ath12k AP on its own initiative; no action by any local user or administrator is needed.\nS:U - The out-of-bounds read, the `kfree()` of an OOB-derived pointer, and the REO LUT corruption all occur within the kernel's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - `ath12k_dp_rx_peer_tid_delete()` reads a full 128-byte `ath12k_dp_rx_tid` at `peer->rx_tid[17]`, 72 bytes of which lie past the end of the 2312-byte allocation in un-zeroed kmalloc-4096 slack, and copies it into a REO command element. The read is unbounded stale-slab content, not a few bounded bytes, and the recovered pointer/DMA-address values feed further driver operations.\nI:H - The path performs an out-of-bounds write (`rx_tid->active = false` clobbers `peer->mcast_keyidx`, the index used to select the group decryption key at `mac.c:8144`), zeroes another peer's TID-0 entry in the hardware-shared REO LUT at index `peer_id*17 + 17` (or writes 8 bytes past the LUT at `DP_MAX_PEER_ID`), and reaches `kfree()` on a pointer read from groomable slab slack — an arbitrary-free primitive leveragable for heap corruption and control-flow hijack.\nA:H - `kfree()` of a garbage pointer and `dma_unmap_single()` with a bogus address and size cause slab-corruption panics and IOMMU faults, while zeroing another station's REO queue address in a table the WiFi hardware reads breaks that peer's RX path and can wedge the firmware, all triggerable repeatedly by an unauthenticated nearby station."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:05:01.054Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.6.103"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.12.43"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.15.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.16.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}