{"id":"CVE-2025-39810","state":"PUBLISHED","title":"bnxt_en: Fix memory corruption when FW resources change during ifdown","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbnxt_en: Fix memory corruption when FW resources change during ifdown\n\nbnxt_set_dflt_rings() assumes that it is always called before any TC has\nbeen created.  So it doesn't take bp->num_tc into account and assumes\nthat it is always 0 or 1.\n\nIn the FW resource or capability change scenario, the FW will return\nflags in bnxt_hwrm_if_change() that will cause the driver to\nreinitialize and call bnxt_cancel_reservations().  This will lead to\nbnxt_init_dflt_ring_mode() calling bnxt_set_dflt_rings() and bp->num_tc\nmay be greater than 1.  This will cause bp->tx_ring[] to be sized too\nsmall and cause memory corruption in bnxt_alloc_cp_rings().\n\nFix it by properly scaling the TX rings by bp->num_tc in the code\npaths mentioned above.  Add 2 helper functions to determine\nbp->tx_nr_rings and bp->tx_nr_rings_per_tc.","publishedAt":"2025-09-16T13:00:12.677Z","updatedAt":"2026-10-30T12:22:29.953Z","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":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"c0082a8947cf1a543013346d10c1857f0c57db83","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"dc797a4bbbcac6d19e6e2508e4df685755cd94a5","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"d00e98977ef519280b075d783653e2c492fffbb6","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"9ab6a9950f152e094395d2e3967f889857daa185","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"2747328ba2714f1a7454208dbbc1dc0631990b4a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/broadcom/bnxt/bnxt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.45","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.5","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/ethernet/broadcom/bnxt/bnxt.c"]}],"references":["https://git.kernel.org/stable/c/c0082a8947cf1a543013346d10c1857f0c57db83","https://git.kernel.org/stable/c/dc797a4bbbcac6d19e6e2508e4df685755cd94a5","https://git.kernel.org/stable/c/d00e98977ef519280b075d783653e2c492fffbb6","https://git.kernel.org/stable/c/9ab6a9950f152e094395d2e3967f889857daa185","https://git.kernel.org/stable/c/2747328ba2714f1a7454208dbbc1dc0631990b4a"],"weaknesses":["CWE-787"],"ingestedAt":"2026-10-30T12:40:04.423Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39810.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39810","state":"PUBLISHED","datePublished":"2025-09-16T13:00:12.677Z","dateUpdated":"2026-10-30T12:22:29.953Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.137Z"},"containers":{"cna":{"title":"bnxt_en: Fix memory corruption when FW resources change during ifdown","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbnxt_en: Fix memory corruption when FW resources change during ifdown\n\nbnxt_set_dflt_rings() assumes that it is always called before any TC has\nbeen created.  So it doesn't take bp->num_tc into account and assumes\nthat it is always 0 or 1.\n\nIn the FW resource or capability change scenario, the FW will return\nflags in bnxt_hwrm_if_change() that will cause the driver to\nreinitialize and call bnxt_cancel_reservations().  This will lead to\nbnxt_init_dflt_ring_mode() calling bnxt_set_dflt_rings() and bp->num_tc\nmay be greater than 1.  This will cause bp->tx_ring[] to be sized too\nsmall and cause memory corruption in bnxt_alloc_cp_rings().\n\nFix it by properly scaling the TX rings by bp->num_tc in the code\npaths mentioned above.  Add 2 helper functions to determine\nbp->tx_nr_rings and bp->tx_nr_rings_per_tc."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"c0082a8947cf1a543013346d10c1857f0c57db83","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"dc797a4bbbcac6d19e6e2508e4df685755cd94a5","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"d00e98977ef519280b075d783653e2c492fffbb6","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"9ab6a9950f152e094395d2e3967f889857daa185","versionType":"git"},{"version":"ec5d31e3c15d5233b491400133c67f78a320062c","status":"affected","lessThan":"2747328ba2714f1a7454208dbbc1dc0631990b4a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/broadcom/bnxt/bnxt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.45","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.5","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/ethernet/broadcom/bnxt/bnxt.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c0082a8947cf1a543013346d10c1857f0c57db83"},{"url":"https://git.kernel.org/stable/c/dc797a4bbbcac6d19e6e2508e4df685755cd94a5"},{"url":"https://git.kernel.org/stable/c/d00e98977ef519280b075d783653e2c492fffbb6"},{"url":"https://git.kernel.org/stable/c/9ab6a9950f152e094395d2e3967f889857daa185"},{"url":"https://git.kernel.org/stable/c/2747328ba2714f1a7454208dbbc1dc0631990b4a"}],"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 trigger sequence is local device configuration — mqprio/DCBNL to set `bp->num_tc > 1` via rtnetlink, then a link down/up cycle through `bnxt_open()`. No remote peer traffic or network protocol data reaches the vulnerable computation.\nAC:L - The attacker arms the condition persistently: once multi-TC is configured, every subsequent ifup that sees a firmware `RESC_CHANGE`/`CAPS_CHANGE` deterministically undersizes `bp->tx_ring[]`, and such resource changes are routine recurring events (SR-IOV VF count changes, RoCE driver load/unload, firmware update, PF reconfiguration) that can simply be waited out and re-triggered by cycling the interface — there is no one-shot race to win.\nPR:L - Reaching the path needs CAP_NET_ADMIN over the bnxt netdev, which in the common SR-IOV cloud/Kubernetes deployment is held by an otherwise unprivileged container after a VF is delegated into its user-namespace-owned network namespace, where `tc qdisc add ... mqprio` and `ip link set up` are permitted. That is delegated network-admin capability, not real root in the init namespace.\nUI:N - No victim action is needed — the corruption occurs entirely within the attacker's own interface bring-up sequence once the multi-TC configuration is in place.\nS:U - The out-of-bounds write corrupts kernel heap objects belonging to the same kernel security authority; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - The overflow plants live `bnxt_cp_ring_info` pointers into adjacent heap objects and leaves `netdev_set_tc_queue()` mappings pointing past `real_num_tx_queues`, so subsequent TX-completion and queue-selection code dereferences and reads memory outside the intended objects, which is leverageable for kernel memory disclosure.\nI:H - `bp->tx_ring[n].tx_cpr = cpr2` writes a kernel heap pointer well beyond the `kcalloc`'d array, at an offset scaled by the attacker-chosen `num_tc` and per-TC ring count — a placement-influenceable arbitrary-ish pointer write into neighbouring slab objects, the classic primitive for control-flow hijack.\nA:H - Corrupting unrelated heap allocations with stray pointers, plus TX queues indexed past `real_num_tx_queues`, reliably produces oops/panic on a machine performing normal networking, and the sequence can be repeated at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:22:29.953Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.12.45"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.16.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-39810","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-01-14T18:14:51.954727Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","lang":"en","type":"CWE","description":"CWE-787 Out-of-bounds Write"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-14T18:22:55.131Z"}}]}}}