{"id":"CVE-2025-21901","state":"PUBLISHED","title":"RDMA/bnxt_re: Add sanity checks on rdev validity","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/bnxt_re: Add sanity checks on rdev validity\n\nThere is a possibility that ulp_irq_stop and ulp_irq_start\ncallbacks will be called when the device is in detached state.\nThis can cause a crash due to NULL pointer dereference as\nthe rdev is already freed.","publishedAt":"2025-04-01T15:26:51.807Z","updatedAt":"2026-08-05T11:55:16.513Z","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":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"aed1bc673907e3df372b317c10ff2f3582f8bf1a","versionType":"git"},{"version":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"8cb0eef46d70a99c88c26a1addb7fd955242e0e6","versionType":"git"},{"version":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"f0df225d12fcb049429fb5bf5122afe143c2dd15","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/bnxt_re/main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.18","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.6","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/bnxt_re/main.c"]}],"references":["https://git.kernel.org/stable/c/aed1bc673907e3df372b317c10ff2f3582f8bf1a","https://git.kernel.org/stable/c/8cb0eef46d70a99c88c26a1addb7fd955242e0e6","https://git.kernel.org/stable/c/f0df225d12fcb049429fb5bf5122afe143c2dd15"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21901.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21901","state":"PUBLISHED","datePublished":"2025-04-01T15:26:51.807Z","dateUpdated":"2026-08-05T11:55:16.513Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.785Z"},"containers":{"cna":{"title":"RDMA/bnxt_re: Add sanity checks on rdev validity","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/bnxt_re: Add sanity checks on rdev validity\n\nThere is a possibility that ulp_irq_stop and ulp_irq_start\ncallbacks will be called when the device is in detached state.\nThis can cause a crash due to NULL pointer dereference as\nthe rdev is already freed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"aed1bc673907e3df372b317c10ff2f3582f8bf1a","versionType":"git"},{"version":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"8cb0eef46d70a99c88c26a1addb7fd955242e0e6","versionType":"git"},{"version":"cc5b9b48d44756a87170f3901c6c2fd99e6b89b2","status":"affected","lessThan":"f0df225d12fcb049429fb5bf5122afe143c2dd15","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/bnxt_re/main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.18","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.6","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/bnxt_re/main.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/aed1bc673907e3df372b317c10ff2f3582f8bf1a"},{"url":"https://git.kernel.org/stable/c/8cb0eef46d70a99c88c26a1addb7fd955242e0e6"},{"url":"https://git.kernel.org/stable/c/f0df225d12fcb049429fb5bf5122afe143c2dd15"}],"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 callbacks are driven by local device-management and error-recovery paths (ethtool ring/channel reconfiguration, devlink/FW reset, SR-IOV reconfiguration, PM suspend/resume, PCIe AER), not by data received from a remote peer. A remote RoCE/Ethernet peer cannot reach `bnxt_re_stop_irq()`/`bnxt_re_start_irq()`.\nAC:L - In the AER and FW-recovery sequences the L2 driver unconditionally calls `bnxt_ulp_irq_stop()`/`bnxt_ulp_irq_restart()` after `bnxt_ulp_stop()` has already freed `rdev`, so the stale-pointer dereference is deterministic rather than racy. Where a window must be hit, the attacker drives both sides — initiating the reset/suspend and issuing the ring-reservation request that calls `bnxt_ulp_irq_stop()`.\nPR:L - Entering the detached window needs only an unprivileged-reachable action such as a logind-permitted system suspend/resume cycle, or a CAP_NET_ADMIN-scoped ethtool ring/channel reconfiguration available to non-root network workloads; once detached, the use-after-free fires from the driver's own recovery path with no further privilege. It does not require full root in the initial namespace.\nUI:N - No victim action is needed — the free and the subsequent dereference both occur inside the driver's suspend/irq-restart sequence once the reset or suspend is under way.\nS:U - The corruption is confined to kernel memory within the same security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - This is a use-after-free on the freed `bnxt_re_dev`: `bnxt_re_start_irq()` reads `rdev->nqr` and `rdev->nqr->num_msix` out of the freed slab, so an attacker who reclaims the object controls a pointer that is then followed, yielding an arbitrary-read primitive and disclosure of kernel memory.\nI:H - `bnxt_re_stop_irq()` performs `set_bit()` writes directly into the freed object and `wake_up_all()` walks a wait-queue list from freed memory invoking `wq_entry->func()`, while `bnxt_re_start_irq()` writes `rdev->nqr->msix_entries[indx].vector` through a pointer read from the freed slab — together a write-what-where and control-flow hijack primitive.\nA:H - Even without heap grooming the dereference of the freed `rdev` (typically a NULL `rdev->nqr` or poisoned contents) causes a kernel oops/panic, and it occurs precisely during firmware/PCIe error recovery, turning a recoverable device fault into a full system crash."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:55:16.513Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.13.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-21901","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-10-01T19:24:32.667966Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-476","lang":"en","type":"CWE","description":"CWE-476 NULL Pointer Dereference"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T19:26:35.142Z"}}]}}}