{"id":"CVE-2022-49076","state":"PUBLISHED","title":"RDMA/hfi1: Fix use-after-free bug for mm struct","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/hfi1: Fix use-after-free bug for mm struct\n\nUnder certain conditions, such as MPI_Abort, the hfi1 cleanup code may\nrepresent the last reference held on the task mm.\nhfi1_mmu_rb_unregister() then drops the last reference and the mm is freed\nbefore the final use in hfi1_release_user_pages().  A new task may\nallocate the mm structure while it is still being used, resulting in\nproblems. One manifestation is corruption of the mmap_sem counter leading\nto a hang in down_write().  Another is corruption of an mm struct that is\nin use by another task.","publishedAt":"2025-02-26T01:54:39.251Z","updatedAt":"2026-08-05T08:53:45.482Z","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":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"5f54364ff6cfcd14cddf5441c4a490bb28dd69f7","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"9ca11bd8222a612de0d2f54d050bfcf61ae2883f","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"0b7186d657ee55e2cdefae498f07d5c1961e8023","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"5a9a1b24ddb510715f8f621263938186579a965c","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"2bbac98d0930e8161b1957dc0ec99de39ade1b3c","versionType":"git"},{"version":"5732f83596f8a573f2cde814cc76a54e1a8995c7","status":"affected","versionType":"git"},{"version":"5.9.12","status":"affected","lessThan":"5.10","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/mmu_rb.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","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/hw/hfi1/mmu_rb.c"]}],"references":["https://git.kernel.org/stable/c/5f54364ff6cfcd14cddf5441c4a490bb28dd69f7","https://git.kernel.org/stable/c/9ca11bd8222a612de0d2f54d050bfcf61ae2883f","https://git.kernel.org/stable/c/0b7186d657ee55e2cdefae498f07d5c1961e8023","https://git.kernel.org/stable/c/5a9a1b24ddb510715f8f621263938186579a965c","https://git.kernel.org/stable/c/2bbac98d0930e8161b1957dc0ec99de39ade1b3c"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49076.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49076","state":"PUBLISHED","datePublished":"2025-02-26T01:54:39.251Z","dateUpdated":"2026-08-05T08:53:45.482Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.246Z"},"containers":{"cna":{"title":"RDMA/hfi1: Fix use-after-free bug for mm struct","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/hfi1: Fix use-after-free bug for mm struct\n\nUnder certain conditions, such as MPI_Abort, the hfi1 cleanup code may\nrepresent the last reference held on the task mm.\nhfi1_mmu_rb_unregister() then drops the last reference and the mm is freed\nbefore the final use in hfi1_release_user_pages().  A new task may\nallocate the mm structure while it is still being used, resulting in\nproblems. One manifestation is corruption of the mmap_sem counter leading\nto a hang in down_write().  Another is corruption of an mm struct that is\nin use by another task."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"5f54364ff6cfcd14cddf5441c4a490bb28dd69f7","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"9ca11bd8222a612de0d2f54d050bfcf61ae2883f","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"0b7186d657ee55e2cdefae498f07d5c1961e8023","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"5a9a1b24ddb510715f8f621263938186579a965c","versionType":"git"},{"version":"3d2a9d642512c21a12d19b9250e7a835dcb41a79","status":"affected","lessThan":"2bbac98d0930e8161b1957dc0ec99de39ade1b3c","versionType":"git"},{"version":"5732f83596f8a573f2cde814cc76a54e1a8995c7","status":"affected","versionType":"git"},{"version":"5.9.12","status":"affected","lessThan":"5.10","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/infiniband/hw/hfi1/mmu_rb.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","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/hw/hfi1/mmu_rb.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5f54364ff6cfcd14cddf5441c4a490bb28dd69f7"},{"url":"https://git.kernel.org/stable/c/9ca11bd8222a612de0d2f54d050bfcf61ae2883f"},{"url":"https://git.kernel.org/stable/c/0b7186d657ee55e2cdefae498f07d5c1961e8023"},{"url":"https://git.kernel.org/stable/c/5a9a1b24ddb510715f8f621263938186579a965c"},{"url":"https://git.kernel.org/stable/c/2bbac98d0930e8161b1957dc0ec99de39ade1b3c"}],"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 bug is reached only through the hfi1 userspace character device path (/dev/hfi1_*, open/ioctl/write/close), specifically hfi1_file_close → hfi1_user_sdma_free_queues → hfi1_mmu_rb_unregister; it is not triggered by remote RDMA packet processing.\nAC:L - An attacker who opens the device, assigns a context (registering the mmu notifier and pinning SDMA pages), then exits reliably makes hfi1 cleanup the last mm holder because do_exit() calls exit_mm() before exit_files(); no conditions beyond attacker control are required.\nPR:L - The hfi1 user device is created with mode 0666 and assign_ctxt/open perform no capability checks, so any unprivileged local user with access to Omni-Path hardware can open it and trigger the path.\nUI:N - Exploitation requires only the attacker's own process actions (open, ioctl, write, exit); no victim user interaction is needed.\nS:U - Impact is confined to the host kernel privilege boundary (mm_struct corruption / local privilege escalation); there is no VM escape or IOMMU/DMA boundary crossing.\nC:H - This is a use-after-free of mm_struct: after mmu_notifier_unregister frees mm, do_remove still uses it via hfi1_release_user_pages; slab reuse of that mm enables corruption of another task's address-space metadata and arbitrary read primitives.\nI:H - UAF writes (e.g. atomic64_sub on mm->pinned_vm) against a reallocated mm_struct corrupt another task's mm (including mmap_lock and related state), enabling heap-spray-based arbitrary write / control-flow hijacking.\nA:H - The UAF reliably causes kernel hangs (mmap_sem/mmap_lock corruption leading to stuck down_write) and can oops/panic when the freed mm is reused or accessed improperly."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:53:45.482Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.10.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.15.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.16.20"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.17.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-49076","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-27T18:17:39.018953Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-27T18:22:35.583Z"}}]}}}