{"id":"CVE-2022-49089","state":"PUBLISHED","title":"IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nIB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition\n\nThe documentation of the function rvt_error_qp says both r_lock and s_lock\nneed to be held when calling that function.  It also asserts using lockdep\nthat both of those locks are held.  However, the commit I referenced in\nFixes accidentally makes the call to rvt_error_qp in rvt_ruc_loopback no\nlonger covered by r_lock.  This results in the lockdep assertion failing\nand also possibly in a race condition.","publishedAt":"2025-02-26T01:54:45.743Z","updatedAt":"2026-10-15T21:21:06.530Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"8a50937227c385a477177c9ffa122b4230e40666","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"92f1947c0d26060e978b3a9f21f32ce7c8c9cca3","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"77ffb2495a41098f9d6a14f8aefde3188da75944","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"57800cc36e55db0547461c49acf5cd84c0f502b0","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"4d809f69695d4e7d1378b3a072fa9aef23123018","versionType":"git"},{"version":"25636de95557a95d54ac30be94af3748345a0a90","status":"affected","versionType":"git"},{"version":"5.0.4","status":"affected","lessThan":"5.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rdmavt/qp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.4.189","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.111","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.34","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.20","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.3","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rdmavt/qp.c"]}],"references":["https://git.kernel.org/stable/c/8a50937227c385a477177c9ffa122b4230e40666","https://git.kernel.org/stable/c/43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0","https://git.kernel.org/stable/c/92f1947c0d26060e978b3a9f21f32ce7c8c9cca3","https://git.kernel.org/stable/c/77ffb2495a41098f9d6a14f8aefde3188da75944","https://git.kernel.org/stable/c/57800cc36e55db0547461c49acf5cd84c0f502b0","https://git.kernel.org/stable/c/4d809f69695d4e7d1378b3a072fa9aef23123018"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49089.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49089","state":"PUBLISHED","datePublished":"2025-02-26T01:54:45.743Z","dateUpdated":"2026-10-15T21:21:06.530Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.248Z"},"containers":{"cna":{"title":"IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nIB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition\n\nThe documentation of the function rvt_error_qp says both r_lock and s_lock\nneed to be held when calling that function.  It also asserts using lockdep\nthat both of those locks are held.  However, the commit I referenced in\nFixes accidentally makes the call to rvt_error_qp in rvt_ruc_loopback no\nlonger covered by r_lock.  This results in the lockdep assertion failing\nand also possibly in a race condition."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"8a50937227c385a477177c9ffa122b4230e40666","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"92f1947c0d26060e978b3a9f21f32ce7c8c9cca3","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"77ffb2495a41098f9d6a14f8aefde3188da75944","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"57800cc36e55db0547461c49acf5cd84c0f502b0","versionType":"git"},{"version":"d757c60eca9b22f4d108929a24401e0fdecda0b1","status":"affected","lessThan":"4d809f69695d4e7d1378b3a072fa9aef23123018","versionType":"git"},{"version":"25636de95557a95d54ac30be94af3748345a0a90","status":"affected","versionType":"git"},{"version":"5.0.4","status":"affected","lessThan":"5.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rdmavt/qp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.1","versionType":"semver"},{"version":"5.4.189","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.111","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.34","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.20","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.3","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/sw/rdmavt/qp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8a50937227c385a477177c9ffa122b4230e40666"},{"url":"https://git.kernel.org/stable/c/43c2d7890ecabe527448a6c391fb2d9a5e6bbfe0"},{"url":"https://git.kernel.org/stable/c/92f1947c0d26060e978b3a9f21f32ce7c8c9cca3"},{"url":"https://git.kernel.org/stable/c/77ffb2495a41098f9d6a14f8aefde3188da75944"},{"url":"https://git.kernel.org/stable/c/57800cc36e55db0547461c49acf5cd84c0f502b0"},{"url":"https://git.kernel.org/stable/c/4d809f69695d4e7d1378b3a072fa9aef23123018"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is rvt_ruc_loopback on the local send engine when an RC/UC QP targets the local LID (hfi1/qib software loopback), reached via ib_uverbs post_send/modify_qp syscalls—not by processing remote fabric packets.\nAC:L - An unprivileged attacker who can open uverbs fully controls both sides of the race by creating multiple local loopback QPs and issuing concurrent post_send operations (one triggering the unlocked rvt_error_qp path, another using the same QP as responder under r_lock).\nPR:L - /dev/infiniband/uverbs* defaults to mode 0666, and creating/using RC QPs for post_send requires no capabilities (CAP_NET_RAW is only for raw packet/QKEY cases), so a normal local user can reach the bug.\nUI:N - Exploitation needs only the attacker’s own RDMA verbs operations; no action by another user is required.\nS:U - Impact is confined to the local host kernel (memory corruption/crash/privilege escalation within the same security authority); this is not a VM escape or IOMMU boundary bypass.\nC:H - rvt_error_qp without r_lock races with concurrent receive-side use of r_sge and can double-put MRs via rvt_clear_mr_refs/rvt_put_ss, yielding a use-after-free of memory regions that can disclose arbitrary kernel/user memory.\nI:H - The same MR use-after-free and corrupted r_sge state provide a heap corruption primitive that can be leveraged for arbitrary writes and control-flow hijacking in the kernel.\nA:H - The related missing-r_lock race in this path already caused documented kernel NULL dereferences (oops/panic) in rvt_clear_mr_refs and copy_sge; the unlocked rvt_error_qp call enables the same availability-destroying crashes."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:53:50.874Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.4.189"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.16.20"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0.4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-49089","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:12:54.975146Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:21:06.530Z"}}]}}}