Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98217 Overview
CVE-2026-98217 is a use-after-free vulnerability in the Linux kernel's InfiniBand (IB) mlx4 driver. The flaw resides in the register_pkey_tree() function, which ignores errors returned from register_one_pkey_tree() and continues registering remaining slaves. When a per-slave registration fails, the error path releases the pkey parent kobjects but leaves stale pointers stored in the device structure. A subsequent device cleanup passes these stale pointers to kobject_put(), triggering a use-after-free condition in kernel memory.
Critical Impact
Use-after-free conditions in kernel-mode drivers can lead to memory corruption, kernel panic, or potential local privilege escalation if an attacker can influence allocation reuse.
Affected Products
- Linux kernel (InfiniBand mlx4 driver subsystem)
- Systems using Mellanox ConnectX-3 and compatible InfiniBand hardware
- Distributions shipping affected kernel versions prior to the fix commits
Discovery Timeline
- 2026-10-06 - CVE-2026-98217 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98217
Vulnerability Analysis
The register_pkey_tree() function in the IB/mlx4 driver iterates through virtual function slaves and invokes register_one_pkey_tree() for each. The parent function implements a best-effort registration pattern and discards any error codes returned from the per-slave registration call. When a slave registration fails midway, the error path within register_one_pkey_tree() releases the pkey parent kobject structures via kobject_put(), freeing the associated memory.
However, the pointers to these freed kobjects remain stored in the device's internal data structures. The registration loop continues processing the remaining slaves without clearing the dangling pointers. During later device teardown, the cleanup routine iterates over all slave entries and calls kobject_put() on each stored pointer. For the slave that previously failed registration, this results in a second put operation on already-freed memory, triggering the use-after-free.
Root Cause
The root cause is a missing pointer invalidation after error handling. The error path in register_one_pkey_tree() releases kobjects but does not clear the parent pointer references in the device structure. Combined with the parent function's decision to ignore registration errors, this creates a window where cleanup logic cannot distinguish successfully registered trees from freed ones.
Attack Vector
Triggering this condition requires inducing a failure during pkey sysfs tree registration, typically during driver initialization or SR-IOV configuration. Local users with the ability to load kernel modules, manipulate SR-IOV configuration, or trigger device reinitialization on affected hardware may be able to reach the vulnerable code path. Successful exploitation depends on controlling the freed memory region before the second kobject_put() executes during device cleanup.
Technical details of the fix are documented in the upstream Linux kernel commits, including Kernel Commit 0c3482e965 and Kernel Commit 791471421d. The fix clears parent pointers after releasing a failed slave tree and skips unregistered trees during device cleanup.
Detection Methods for CVE-2026-98217
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing kobject_put or mlx4_ib in dmesg or /var/log/messages
- KASAN (Kernel Address Sanitizer) reports flagging use-after-free in the mlx4_ib pkey registration code path
- Repeated driver initialization failures on hosts with Mellanox InfiniBand hardware and SR-IOV enabled
Detection Strategies
- Audit running kernel versions against the fix commits listed in the kernel.org references to identify unpatched hosts
- Enable KASAN on test and staging kernels to catch use-after-free conditions during driver stress testing
- Monitor kernel ring buffer events for mlx4_ib warnings, slab corruption indicators, and sysfs registration failures
Monitoring Recommendations
- Forward dmesg and kernel audit logs to a centralized log store for correlation across InfiniBand-equipped hosts
- Alert on kernel panics, oops events, and slab corruption warnings on hosts running the mlx4_ib driver
- Track driver load, unload, and SR-IOV reconfiguration events to identify abnormal registration failure patterns
How to Mitigate CVE-2026-98217
Immediate Actions Required
- Identify all Linux hosts running the mlx4_ib driver and inventory their kernel versions against the upstream fix commits
- Apply vendor-provided kernel updates that incorporate the backported fix as soon as they are available for your distribution
- Restrict local access on affected systems and limit which users can trigger SR-IOV reconfiguration or module reloads
Patch Information
The vulnerability is resolved by a series of upstream Linux kernel commits that clear parent pointers after releasing a failed slave tree and skip unregistered trees during device cleanup. Relevant fix commits include Kernel Commit 1af874e9f4, Kernel Commit 734f066933, Kernel Commit a07bee3212, Kernel Commit ced1186fea, Kernel Commit cf20d74767, and Kernel Commit ffb8087261. Deploy the kernel package provided by your Linux distribution once it includes these fixes.
Workarounds
- Where kernel updates cannot be applied immediately, unload the mlx4_ib module on hosts that do not require InfiniBand functionality
- Avoid dynamic SR-IOV reconfiguration on affected hosts to reduce the likelihood of triggering the failing registration path
- Enforce least-privilege access controls so unprivileged users cannot load kernel modules or manipulate device state
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

