Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-50059

published high CVSS 3.1 · 7.8

ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition

Published
21 Oct 2024, 19:39:49 UTC
Updated
05 Aug 2026, 11:41:18 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxd04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 5126d8f5567f49b52e21fca320eaa97977055099 · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < b650189687822b705711f0567a65a164a314d8df · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 92728fceefdaa2a0a3aae675f86193b006eeaa43 · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 3ae45be8492460a35b5aebf6acac1f1d32708946 · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < fa840ba4bd9f3bad7f104e5b32028ee73af8b3dd · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 177925d9c8715a897bb79eca62628862213ba956 · d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < e51aded92d42784313ba16c12f4f88cc4f973bbb · Other versions: unaffected Affected Not stated Linux
Linux — Linux4.16 (affected) · 0 to < 4.16 (unaffected · semver) · 5.4.285 through 5.4.* (unaffected · semver) · 5.10.227 through 5.10.* (unaffected · semver) · 5.15.168 through 5.15.* (unaffected · semver) · 6.1.113 through 6.1.* (unaffected · semver) · 6.6.57 through 6.6.* (unaffected · semver) · 6.11.4 through 6.11.* (unaffected · semver) · 6.12 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
Debian bullseye linux Advisory build 5.10.234-1 DLA-4075-1
Oracle Linux 7 kernel-uekaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
SUSE / openSUSE SLE-15-SP5 cluster-md-kmp-defaultaarch64 Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
Debian bullseye linux-6.1 Advisory build 6.1.119-1~deb11u1 DLA-4008-1
Show 96 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Oracle Linux 7 kernel-uekx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-containerx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-container-debugx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-debugaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-debugx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-debug-develaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-debug-develx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-develaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-develx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-docaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-docx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-toolsaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-toolsx86_64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 kernel-uek-tools-libsaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 perfaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 7 python-perfaarch64 Advisory build 0:5.4.17-2136.338.4.1.el7uek ELSA-2024-12884
Oracle Linux 8 bpftoolaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 bpftoolx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uekx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uekx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-containeraarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-containerx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-containerx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-container-debugx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-coreaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-corex86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debugaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debugaarch64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-debugx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debugx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-develaarch64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-develx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-develaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-develaarch64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-develx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-develx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-docaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-docaarch64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-docx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-docx86_64 Advisory build 0:5.4.17-2136.338.4.1.el8uek ELSA-2024-12884
Oracle Linux 8 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 8 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-303.171.5.2.el8uek ELSA-2024-12887
Oracle Linux 9 bpftoolaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 bpftoolx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uekaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uekx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-containeraarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-containerx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-coreaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-corex86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debugaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debugx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-develaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-develx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-docaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-docx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
Oracle Linux 9 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-303.171.5.2.el9uek ELSA-2024-12887
SUSE / openSUSE SLE-15-SP5 cluster-md-kmp-defaultppc64le Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 cluster-md-kmp-defaults390x Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 cluster-md-kmp-defaultx86_64 Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 cluster-md-kmp-rtx86_64 Advisory build 5.14.21-150500.13.76.1 SUSE-SU-2024:3985-1
SUSE / openSUSE SLE-15-SP5 dlm-kmp-defaultaarch64 Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 dlm-kmp-defaultppc64le Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 dlm-kmp-defaults390x Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 dlm-kmp-defaultx86_64 Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 dlm-kmp-rtx86_64 Advisory build 5.14.21-150500.13.76.1 SUSE-SU-2024:3985-1
SUSE / openSUSE SLE-15-SP5 gfs2-kmp-defaultaarch64 Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 gfs2-kmp-defaultppc64le Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1
SUSE / openSUSE SLE-15-SP5 gfs2-kmp-defaults390x Advisory build 5.14.21-150500.55.88.1 SUSE-SU-2024:4364-1

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition In the switchtec_ntb_add function, it can call switchtec_ntb_init_sndev function, then &sndev->check_link_status_work is bound with check_link_status_work. switchtec_ntb_link_notification may be called to start the work. If we remove the module which will call switchtec_ntb_remove to make cleanup, it will free sndev through kfree(sndev), while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | check_link_status_work switchtec_ntb_remove | kfree(sndev); | | if (sndev->link_force_down) | // use sndev Fix it by ensuring that the work is canceled before proceeding with the cleanup in switchtec_ntb_remove.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

62

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The freeing side of the race is driver teardown, entered only through local actions — `rmmod ntb_hw_switchtec`, a write to `/sys/bus/pci/drivers/switchtec/unbind`, or `/sys/bus/pci/devices/.../remove` — and the racing side arrives over the PCIe/NTB fabric rather than a network stack. No network or adjacent-network protocol reaches this code, so local system access is the entry point. AC:L - The attacker controls both sides: the NTB peer host (or a local user driving the Switchtec management device) can send `LINK_MESSAGE`/`MSG_LINK_FORCE_DOWN` continuously so `check_link_status_work` is always pending, and `switchtec_ntb_part_op()` then sleeps up to 1000×50 ms inside the object, holding the window open for tens of seconds while teardown is triggered. Bind/unbind can also be repeated indefinitely, so success depends on nothing outside the attacker's influence. PR:L - The side that keeps the work item live requires no privilege — it is driven by the NTB peer host's link messages, by PCIe link-state events, or by non-CAP_SYS_ADMIN MRPC commands on `/dev/switchtecN` (the driver explicitly gates only GAS read/write on CAP_SYS_ADMIN) — while the `kfree()` occurs on any device removal, including surprise PCIe hot-remove and routine administrative unbind. Consistent with the scoring of the equivalent driver remove-path work-item UAFs (e.g. CVE-2024-57984), low local privileges are the defensible assumption. UI:N - The removal and the link-message traffic are both initiated by the attacker or generated autonomously by the PCIe hardware; no victim must mount a filesystem, open a file, or take any other action. Exploitation completes entirely from the attacker's own operations. S:U - The use-after-free corrupts kernel heap state and is exploited within the same kernel security authority that owns the driver. No hypervisor, IOMMU, or sandbox boundary is crossed by the vulnerability itself. C:H - After `kfree(sndev)` the worker reads `link_force_down`, `mmio_ntb`, `mmio_peer_ctrl`, `mmio_peer_dbmsg`, `self_shared_dma`, `peer_direct_mw_to_bar[]` and `stdev->dev` back out of freed memory, and the ~50-second sleep inside `switchtec_ntb_part_op()` makes slab reclaim by an attacker-sprayed object highly practical, converting the dangling object into a controlled kernel read primitive. Per use-after-free scoring guidance this is High. I:H - `ntb_link_event()` performs `ntb->ctx_ops->link_event(ntb->ctx)` — an indirect branch through a function pointer read from freed memory — and `config_rsvd_lut_win()` issues `iowrite32`/`iowrite64` to `&ctl->bar_entry[peer_bar]`/`&ctl->lut_entry[]` with base pointer, index and payload all taken from the freed object, giving both control-flow hijack and a controlled write (including reprogramming of the NTB DMA translation window) after heap spraying. A:H - Even without successful exploitation, the worker takes a spinlock in freed memory, dereferences freed `__iomem` pointers and touches the device after teardown, and the concurrent `link_notifier`/`sndev` NULL stores add a NULL-pointer dereference path — any of which produces a kernel oops or panic.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 5126d8f5567f49b52e21fca320eaa97977055099 (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < b650189687822b705711f0567a65a164a314d8df (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 92728fceefdaa2a0a3aae675f86193b006eeaa43 (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 3ae45be8492460a35b5aebf6acac1f1d32708946 (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < fa840ba4bd9f3bad7f104e5b32028ee73af8b3dd (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < 177925d9c8715a897bb79eca62628862213ba956 (affected · git)d04be142b8b61ffb3c9cc5c6d1abda8fc59a16c9 to < e51aded92d42784313ba16c12f4f88cc4f973bbb (affected · git)Default: unaffected Linux · cna
Linux Linux 4.16 (affected)0 to < 4.16 (unaffected · semver)5.4.285 through 5.4.* (unaffected · semver)5.10.227 through 5.10.* (unaffected · semver)5.15.168 through 5.15.* (unaffected · semver)6.1.113 through 6.1.* (unaffected · semver)6.6.57 through 6.6.* (unaffected · semver)6.11.4 through 6.11.* (unaffected · semver)6.12 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

9

Provider assertions

3

Linux · cna

ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race condition

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
5ba6b8e40bacc593c52552c4758dd6352901bfa3f0ccd6d0321fbed4dda6901f
Ingested
23 Sep 2026, 08:29:52 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected