{"api_version":"1","generated_at":"2026-12-01T13:19:08+00:00","cve":"CVE-2026-139254","urls":{"html":"https://cve.report/CVE-2026-139254","api":"https://cve.report/api/cve/CVE-2026-139254.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139254","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139254"},"summary":{"title":"net/mlx5: HWS, fix modify header pool creation race","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: HWS, fix modify header pool creation race\n\nmlx5_cmd_hws_modify_header_alloc() creates a pool at the index after\nthe last one if no pool matches the pattern. TC and CT allocate modify\nheaders concurrently, meaning two callers can take the same index and\nthe second call fails with -EBUSY.\n\nIts error path also destroys the pool it just created although another\ncaller may already use it. Keep such a pool since cleanup releases it.\n\nPools now live until cleanup so the lookup needs no lock. A miss looks\nagain under a mutex before creating the pool.\n\nTested for regressions on ConnectX-7 with firmware 28.48.1000.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:47","updated_at":"2026-12-01 06:17:40"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/d0df668d184893e596c9ce9ec55fff339949c803","name":"https://git.kernel.org/stable/c/d0df668d184893e596c9ce9ec55fff339949c803","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/479939aca455d0d14d618fb31668b49503e3dfeb","name":"https://git.kernel.org/stable/c/479939aca455d0d14d618fb31668b49503e3dfeb","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e4ab8ab27ab1c9f0cd1589bee471d93319e20c95","name":"https://git.kernel.org/stable/c/e4ab8ab27ab1c9f0cd1589bee471d93319e20c95","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139254","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139254","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b36315ca69cb39c839c98a31cae27b266481b0ac 479939aca455d0d14d618fb31668b49503e3dfeb git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b36315ca69cb39c839c98a31cae27b266481b0ac d0df668d184893e596c9ce9ec55fff339949c803 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b36315ca69cb39c839c98a31cae27b266481b0ac e4ab8ab27ab1c9f0cd1589bee471d93319e20c95 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.14","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.14 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c","drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"479939aca455d0d14d618fb31668b49503e3dfeb","status":"affected","version":"b36315ca69cb39c839c98a31cae27b266481b0ac","versionType":"git"},{"lessThan":"d0df668d184893e596c9ce9ec55fff339949c803","status":"affected","version":"b36315ca69cb39c839c98a31cae27b266481b0ac","versionType":"git"},{"lessThan":"e4ab8ab27ab1c9f0cd1589bee471d93319e20c95","status":"affected","version":"b36315ca69cb39c839c98a31cae27b266481b0ac","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c","drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.14"},{"lessThan":"6.14","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.14","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: HWS, fix modify header pool creation race\n\nmlx5_cmd_hws_modify_header_alloc() creates a pool at the index after\nthe last one if no pool matches the pattern. TC and CT allocate modify\nheaders concurrently, meaning two callers can take the same index and\nthe second call fails with -EBUSY.\n\nIts error path also destroys the pool it just created although another\ncaller may already use it. Keep such a pool since cleanup releases it.\n\nPools now live until cleanup so the lookup needs no lock. A miss looks\nagain under a mutex before creating the pool.\n\nTested for regressions on ConnectX-7 with firmware 28.48.1000."}],"metrics":[{"cvssV3_1":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"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.\nAC: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.\nPR: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.\nUI:N - No victim action is involved; the attacker issues both concurrent CREATE_MODIFY_HEADER ioctls from their own process.\nS:U - The freed object is a host-kernel heap struct mlx5_fs_pool; the corruption stays within the host kernel's own security authority.\nC: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.\nI: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.\nA: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."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:42:01.650Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/479939aca455d0d14d618fb31668b49503e3dfeb"},{"url":"https://git.kernel.org/stable/c/d0df668d184893e596c9ce9ec55fff339949c803"},{"url":"https://git.kernel.org/stable/c/e4ab8ab27ab1c9f0cd1589bee471d93319e20c95"}],"title":"net/mlx5: HWS, fix modify header pool creation race","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139254","datePublished":"2026-11-30T13:33:02.805Z","dateReserved":"2026-11-30T13:22:15.923Z","dateUpdated":"2026-12-01T05:42:01.650Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:47","lastModifiedDate":"2026-12-01 06:17:40","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139254","Ordinal":"1","Title":"net/mlx5: HWS, fix modify header pool creation race","CVE":"CVE-2026-139254","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139254","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: HWS, fix modify header pool creation race\n\nmlx5_cmd_hws_modify_header_alloc() creates a pool at the index after\nthe last one if no pool matches the pattern. TC and CT allocate modify\nheaders concurrently, meaning two callers can take the same index and\nthe second call fails with -EBUSY.\n\nIts error path also destroys the pool it just created although another\ncaller may already use it. Keep such a pool since cleanup releases it.\n\nPools now live until cleanup so the lookup needs no lock. A miss looks\nagain under a mutex before creating the pool.\n\nTested for regressions on ConnectX-7 with firmware 28.48.1000.","Type":"Description","Title":"net/mlx5: HWS, fix modify header pool creation race"}]}}}