{"api_version":"1","generated_at":"2026-11-30T18:46:13+00:00","cve":"CVE-2026-139099","urls":{"html":"https://cve.report/CVE-2026-139099","api":"https://cve.report/api/cve/CVE-2026-139099.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139099","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139099"},"summary":{"title":"net: bgmac: fix TX DMA unmapping and slot cleanup","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: bgmac: fix TX DMA unmapping and slot cleanup\n\nWhen mapping a fragment fails, bgmac_dma_tx_add() unwinds with the\nwrong slots. It passes the failed fragment's slot->dma_addr, which\nholds the mapping error, to dma_unmap_single() for the head. The\nfragment loop indexes from ring->end instead of ring->end + 1, so it\nunmaps the head a second time as a page and leaves the last mapped\nfragment mapped. None of the affected slots get their dma_addr cleared\neither, which includes the head slot when mapping the head fails.\n\nbgmac_dma_tx_ring_free() unmaps every slot with a non-zero dma_addr,\nso tearing down the ring unmaps these addresses again. It also frees\nthe skbs of pending TX slots but leaves slot->skb and slot->dma_addr\nset. The slots survive a down/up cycle, and bgmac_dma_tx_add() only\nsets slot->skb on the last slot of a packet. If a slot with a stale\npointer is later used for the head or a fragment of a scatter/gather\npacket, bgmac_dma_tx_free() frees the old skb a second time when that\nslot completes.\n\nbgmac_dma_tx_ring_free() also picks dma_unmap_single() or\ndma_unmap_page() by looking at slot->skb, which is set on the last slot\nof a packet, while the head was mapped with dma_map_single() and the\nfragments with skb_frag_dma_map().\n\nIn the error path, unmap the head and each mapped fragment from their\nown slots, and clear dma_addr on every slot the failed packet touched.\nIn bgmac_dma_tx_ring_free(), choose the unmap function by the SOF flag\nof the descriptor like bgmac_dma_tx_free() does, unmap every slot\nbefore freeing any skb, since a packet can wrap around the end of the\nring with its skb on the last slot, and clear both fields.\n\nThis was found through code inspection by an LLM while hitting other\nbugs on an Asus RT-N16. It did not hit these ones specifically.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:18","updated_at":"2026-11-30 14:18:18"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/6538279222f65f05698fd7edf39b440ad2b5de35","name":"https://git.kernel.org/stable/c/6538279222f65f05698fd7edf39b440ad2b5de35","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/74c41171e6dbfe33487f2314b717905a617fafef","name":"https://git.kernel.org/stable/c/74c41171e6dbfe33487f2314b717905a617fafef","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1d25a2c0f491c410efc25d082a47b5e20eae91d0","name":"https://git.kernel.org/stable/c/1d25a2c0f491c410efc25d082a47b5e20eae91d0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0e5a0f01e9b6cc1866305972eec902dd5f82a0ad","name":"https://git.kernel.org/stable/c/0e5a0f01e9b6cc1866305972eec902dd5f82a0ad","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/88979640f4155bf94ffdb71e202e6f2bbb77f5c6","name":"https://git.kernel.org/stable/c/88979640f4155bf94ffdb71e202e6f2bbb77f5c6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4489cb65d52e488e60b88022b25122e887e24b6f","name":"https://git.kernel.org/stable/c/4489cb65d52e488e60b88022b25122e887e24b6f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4f45e97b3aac2282f2b436d97338c9c2c484d093","name":"https://git.kernel.org/stable/c/4f45e97b3aac2282f2b436d97338c9c2c484d093","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e86b4724bb4d0e133cab811635d937cafc9ae5b8","name":"https://git.kernel.org/stable/c/e86b4724bb4d0e133cab811635d937cafc9ae5b8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139099","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139099","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 88979640f4155bf94ffdb71e202e6f2bbb77f5c6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 0e5a0f01e9b6cc1866305972eec902dd5f82a0ad git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 6538279222f65f05698fd7edf39b440ad2b5de35 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 e86b4724bb4d0e133cab811635d937cafc9ae5b8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 74c41171e6dbfe33487f2314b717905a617fafef git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 1d25a2c0f491c410efc25d082a47b5e20eae91d0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 4489cb65d52e488e60b88022b25122e887e24b6f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9cde94506eacfcda570b6c304b8deae1a7191ee2 4f45e97b3aac2282f2b436d97338c9c2c484d093 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/net/ethernet/broadcom/bgmac.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"88979640f4155bf94ffdb71e202e6f2bbb77f5c6","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"0e5a0f01e9b6cc1866305972eec902dd5f82a0ad","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"6538279222f65f05698fd7edf39b440ad2b5de35","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"e86b4724bb4d0e133cab811635d937cafc9ae5b8","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"74c41171e6dbfe33487f2314b717905a617fafef","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"1d25a2c0f491c410efc25d082a47b5e20eae91d0","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"4489cb65d52e488e60b88022b25122e887e24b6f","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"},{"lessThan":"4f45e97b3aac2282f2b436d97338c9c2c484d093","status":"affected","version":"9cde94506eacfcda570b6c304b8deae1a7191ee2","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/net/ethernet/broadcom/bgmac.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.1"},{"lessThan":"4.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"4.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: bgmac: fix TX DMA unmapping and slot cleanup\n\nWhen mapping a fragment fails, bgmac_dma_tx_add() unwinds with the\nwrong slots. It passes the failed fragment's slot->dma_addr, which\nholds the mapping error, to dma_unmap_single() for the head. The\nfragment loop indexes from ring->end instead of ring->end + 1, so it\nunmaps the head a second time as a page and leaves the last mapped\nfragment mapped. None of the affected slots get their dma_addr cleared\neither, which includes the head slot when mapping the head fails.\n\nbgmac_dma_tx_ring_free() unmaps every slot with a non-zero dma_addr,\nso tearing down the ring unmaps these addresses again. It also frees\nthe skbs of pending TX slots but leaves slot->skb and slot->dma_addr\nset. The slots survive a down/up cycle, and bgmac_dma_tx_add() only\nsets slot->skb on the last slot of a packet. If a slot with a stale\npointer is later used for the head or a fragment of a scatter/gather\npacket, bgmac_dma_tx_free() frees the old skb a second time when that\nslot completes.\n\nbgmac_dma_tx_ring_free() also picks dma_unmap_single() or\ndma_unmap_page() by looking at slot->skb, which is set on the last slot\nof a packet, while the head was mapped with dma_map_single() and the\nfragments with skb_frag_dma_map().\n\nIn the error path, unmap the head and each mapped fragment from their\nown slots, and clear dma_addr on every slot the failed packet touched.\nIn bgmac_dma_tx_ring_free(), choose the unmap function by the SOF flag\nof the descriptor like bgmac_dma_tx_free() does, unmap every slot\nbefore freeing any skb, since a packet can wrap around the end of the\nring with its skb on the last slot, and clear both fields.\n\nThis was found through code inspection by an LLM while hitting other\nbugs on an Asus RT-N16. It did not hit these ones specifically."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:31:34.056Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/88979640f4155bf94ffdb71e202e6f2bbb77f5c6"},{"url":"https://git.kernel.org/stable/c/0e5a0f01e9b6cc1866305972eec902dd5f82a0ad"},{"url":"https://git.kernel.org/stable/c/6538279222f65f05698fd7edf39b440ad2b5de35"},{"url":"https://git.kernel.org/stable/c/e86b4724bb4d0e133cab811635d937cafc9ae5b8"},{"url":"https://git.kernel.org/stable/c/74c41171e6dbfe33487f2314b717905a617fafef"},{"url":"https://git.kernel.org/stable/c/1d25a2c0f491c410efc25d082a47b5e20eae91d0"},{"url":"https://git.kernel.org/stable/c/4489cb65d52e488e60b88022b25122e887e24b6f"},{"url":"https://git.kernel.org/stable/c/4f45e97b3aac2282f2b436d97338c9c2c484d093"}],"title":"net: bgmac: fix TX DMA unmapping and slot cleanup","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139099","datePublished":"2026-11-30T13:31:34.056Z","dateReserved":"2026-11-30T13:22:15.914Z","dateUpdated":"2026-11-30T13:31:34.056Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:18","lastModifiedDate":"2026-11-30 14:18:18","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139099","Ordinal":"1","Title":"net: bgmac: fix TX DMA unmapping and slot cleanup","CVE":"CVE-2026-139099","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139099","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: bgmac: fix TX DMA unmapping and slot cleanup\n\nWhen mapping a fragment fails, bgmac_dma_tx_add() unwinds with the\nwrong slots. It passes the failed fragment's slot->dma_addr, which\nholds the mapping error, to dma_unmap_single() for the head. The\nfragment loop indexes from ring->end instead of ring->end + 1, so it\nunmaps the head a second time as a page and leaves the last mapped\nfragment mapped. None of the affected slots get their dma_addr cleared\neither, which includes the head slot when mapping the head fails.\n\nbgmac_dma_tx_ring_free() unmaps every slot with a non-zero dma_addr,\nso tearing down the ring unmaps these addresses again. It also frees\nthe skbs of pending TX slots but leaves slot->skb and slot->dma_addr\nset. The slots survive a down/up cycle, and bgmac_dma_tx_add() only\nsets slot->skb on the last slot of a packet. If a slot with a stale\npointer is later used for the head or a fragment of a scatter/gather\npacket, bgmac_dma_tx_free() frees the old skb a second time when that\nslot completes.\n\nbgmac_dma_tx_ring_free() also picks dma_unmap_single() or\ndma_unmap_page() by looking at slot->skb, which is set on the last slot\nof a packet, while the head was mapped with dma_map_single() and the\nfragments with skb_frag_dma_map().\n\nIn the error path, unmap the head and each mapped fragment from their\nown slots, and clear dma_addr on every slot the failed packet touched.\nIn bgmac_dma_tx_ring_free(), choose the unmap function by the SOF flag\nof the descriptor like bgmac_dma_tx_free() does, unmap every slot\nbefore freeing any skb, since a packet can wrap around the end of the\nring with its skb on the last slot, and clear both fields.\n\nThis was found through code inspection by an LLM while hitting other\nbugs on an Asus RT-N16. It did not hit these ones specifically.","Type":"Description","Title":"net: bgmac: fix TX DMA unmapping and slot cleanup"}]}}}