{"id":"CVE-2026-139593","state":"PUBLISHED","title":"RDMA/mlx5: Set QP event handler before firmware QPC insertion","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Set QP event handler before firmware QPC insertion\n\nFour QP creation paths assigned base->container_mibqp and\nbase->mqp.event after the firmware create call that inserts the QP into\ndev->qp_table.tree. A firmware error EQE in that window reaches\nqp->event() with a NULL pointer.\n\nMove both assignments before the firmware call.\n\nAlso set ibqp.qp_num inside mlx5_qpc_create_qp() before\ncreate_resource_common() so an EQE arriving early does not observe\nqp_num==0.\n\nIn addition, add a WARN_ON_ONCE(!qp->event) guard in\nrsc_event_notifier() as a safeguard for future regressions.","publishedAt":"2026-11-30T13:36:11.336Z","updatedAt":"2026-11-30T13:36:11.336Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"52f40c02f9b91a14d34cdf7ebff833716aa60acf","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"b5ff026b41d2ff4c7708e8ce9750388ea09e6e96","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"2570ac441eda1a76aaf7aa4dd56bbe297e527ec8","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"05a078c97eb0bb7158526dae414b853737692485","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mlx5/qp.c","drivers/infiniband/hw/mlx5/qpc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.11","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","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/mlx5/qp.c","drivers/infiniband/hw/mlx5/qpc.c"]}],"references":["https://git.kernel.org/stable/c/52f40c02f9b91a14d34cdf7ebff833716aa60acf","https://git.kernel.org/stable/c/b5ff026b41d2ff4c7708e8ce9750388ea09e6e96","https://git.kernel.org/stable/c/2570ac441eda1a76aaf7aa4dd56bbe297e527ec8","https://git.kernel.org/stable/c/05a078c97eb0bb7158526dae414b853737692485"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139593.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139593","state":"PUBLISHED","datePublished":"2026-11-30T13:36:11.336Z","dateUpdated":"2026-11-30T13:36:11.336Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.942Z"},"containers":{"cna":{"title":"RDMA/mlx5: Set QP event handler before firmware QPC insertion","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/mlx5: Set QP event handler before firmware QPC insertion\n\nFour QP creation paths assigned base->container_mibqp and\nbase->mqp.event after the firmware create call that inserts the QP into\ndev->qp_table.tree. A firmware error EQE in that window reaches\nqp->event() with a NULL pointer.\n\nMove both assignments before the firmware call.\n\nAlso set ibqp.qp_num inside mlx5_qpc_create_qp() before\ncreate_resource_common() so an EQE arriving early does not observe\nqp_num==0.\n\nIn addition, add a WARN_ON_ONCE(!qp->event) guard in\nrsc_event_notifier() as a safeguard for future regressions."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"52f40c02f9b91a14d34cdf7ebff833716aa60acf","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"b5ff026b41d2ff4c7708e8ce9750388ea09e6e96","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"2570ac441eda1a76aaf7aa4dd56bbe297e527ec8","versionType":"git"},{"version":"e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c","status":"affected","lessThan":"05a078c97eb0bb7158526dae414b853737692485","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/mlx5/qp.c","drivers/infiniband/hw/mlx5/qpc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.11","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","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/mlx5/qp.c","drivers/infiniband/hw/mlx5/qpc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/52f40c02f9b91a14d34cdf7ebff833716aa60acf"},{"url":"https://git.kernel.org/stable/c/b5ff026b41d2ff4c7708e8ce9750388ea09e6e96"},{"url":"https://git.kernel.org/stable/c/2570ac441eda1a76aaf7aa4dd56bbe297e527ec8"},{"url":"https://git.kernel.org/stable/c/05a078c97eb0bb7158526dae414b853737692485"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:11.336Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.11","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}