CVE-2026-139254
published high CVSS 3.1 · 7.0net/mlx5: HWS, fix modify header pool creation race
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxb36315ca69cb39c839c98a31cae27b266481b0ac to < 479939aca455d0d14d618fb31668b49503e3dfeb · b36315ca69cb39c839c98a31cae27b266481b0ac to < d0df668d184893e596c9ce9ec55fff339949c803 · b36315ca69cb39c839c98a31cae27b266481b0ac to < e4ab8ab27ab1c9f0cd1589bee471d93319e20c95 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.14 (affected) · 0 to < 6.14 (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 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; Pending Fix | Not stated | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, fix modify header pool creation race mlx5_cmd_hws_modify_header_alloc() creates a pool at the index after the last one if no pool matches the pattern. TC and CT allocate modify headers concurrently, meaning two callers can take the same index and the second call fails with -EBUSY. Its error path also destroys the pool it just created although another caller may already use it. Keep such a pool since cleanup releases it. Pools now live until cleanup so the lookup needs no lock. A miss looks again under a mutex before creating the pool. Tested for regressions on ConnectX-7 with firmware 28.48.1000.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - mlx5_cmd_hws_modify_header_alloc() is reached via the uverbs ioctl MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER on the uplink representor's /dev/infiniband/uverbsN (ft_type FDB -> FDB_BYPASS -> FDB root ns with HWS cmds); the colliding patterns and their timing come from a local process, not off a wire. AC:H - The attacker drives both threads. A submits a pattern that fails mlx5hws_pat_verify_actions() after xa_insert and the FW arg create, so its pool is destroyed; B, sending the same pattern, finds it and waits on pool_lock. But the HWS FDB ops exist only in switchdev with flow_steering_mode=hmfs, which an admin must opt into on SMFS-capable CX-7/CX-8 and the attacker cannot set. PR:L - uverbs_devnode() sets mode 0666, rdma_dev_access_netns() passes in the default shared mode, and neither the CREATE_MODIFY_HEADER handler nor mlx5_ib_create_modify_header() checks any capability, so an ordinary local user with a ucontext reaches pool creation and destruction. UI:N - No victim action is involved; the attacker issues both concurrent CREATE_MODIFY_HEADER ioctls from their own process. S:U - The freed object is a host-kernel heap struct mlx5_fs_pool; the corruption stays within the host kernel's own security authority. C:H - After mlx5_fs_destroy_mh_pool() kfree()s the kzalloc'd mlx5_fs_pool and its pool_ctx pattern, thread B still reads pool_ctx, the pattern data and the list heads through its stale pointer, so a reclaimed slab object feeds attacker-chosen contents into kernel reads. I:H - In mlx5_fs_pool_acquire_index() thread B writes the freed pool's pool_lock mutex, list heads and available_units, then calls fs_pool->ops->bulk_create() through an ops pointer loaded from the freed object, which is a write primitive plus an indirect-call hijack once the slot is reclaimed. A:H - Even if not exploited, mutex and list operations on freed memory crash or corrupt the kernel; the race can also leave a hole in mh_pools so the counted xa_insert index returns -EBUSY for every new pattern, failing TC and CT modify-header offloads until the eswitch is reset.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | b36315ca69cb39c839c98a31cae27b266481b0ac to < 479939aca455d0d14d618fb31668b49503e3dfeb (affected · git)b36315ca69cb39c839c98a31cae27b266481b0ac to < d0df668d184893e596c9ce9ec55fff339949c803 (affected · git)b36315ca69cb39c839c98a31cae27b266481b0ac to < e4ab8ab27ab1c9f0cd1589bee471d93319e20c95 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.14 (affected)0 to < 6.14 (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
net/mlx5: HWS, fix modify header pool creation race
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 747a0c2b5911cc6db2e79964cb097ae09294618d015094897bb96918ad09f9cc
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record