{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50137",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-06-18T10:57:27.422Z",
        "datePublished": "2025-06-18T11:03:00.899Z",
        "dateUpdated": "2026-08-05T08:57:31.640Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:57:31.640Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/irdma: Fix a window for use-after-free\n\nDuring a destroy CQ an interrupt may cause processing of a CQE after CQ\nresources are freed by irdma_cq_free_rsrc(). Fix this by moving the call\nto irdma_cq_free_rsrc() after the irdma_sc_cleanup_ceqes(), which is\ncalled under the cq_lock."
                }
            ],
            "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 triggered by destroying an irdma completion queue through the RDMA verbs path (/dev/infiniband/uverbs* → ib_uverbs_destroy_cq → irdma_destroy_cq); no remote packet parser reaches this free path.\nAC:L - An attacker who owns the RDMA context controls both sides of the race—posting work to keep CEQ completions pending and concurrently destroying the CQ—so the window between irdma_cq_free_rsrc() and irdma_sc_cleanup_ceqes() can be hit reliably by retrying.\nPR:L - InfiniBand user verbs are intended for unprivileged processes, and creating/destroying a CQ requires only an RDMA uverbs context, not capabilities in the init user namespace.\nUI:N - The attacker performs the verbs operations themselves; no action by another user is required.\nS:U - The use-after-free corrupts kernel memory within the same OS security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - Use-after-free of CQ resources while irdma_process_ceq()/irdma_sc_process_ceq() still handles CEQEs allows reclaim of freed DMA/slab state and attacker-controlled reads via the completion path.\nI:H - The same UAF lets the interrupt path operate on freed/reclaimed CQ state (including irdma_sc_cq_ack() doorbell writes and irdma_iwarp_ce_handler()'s indirect comp_handler call), enabling arbitrary write and control-flow hijack primitives.\nA:H - Even without full exploitation, processing CEQEs against freed CQ resources causes kernel oops/panic in interrupt/softirq context and takes the system down."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/infiniband/hw/irdma/verbs.c"
                    ],
                    "versions": [
                        {
                            "version": "b48c24c2d710cf34810c555dcef883a3d35a9c08",
                            "lessThan": "92520864ef9f912f38b403d172a0ded020683d55",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b48c24c2d710cf34810c555dcef883a3d35a9c08",
                            "lessThan": "0abf2eef80295923b819ce89ff9edc1fe61be17c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b48c24c2d710cf34810c555dcef883a3d35a9c08",
                            "lessThan": "350ac793a03c8a30a3f2b27fc282cd1c67070763",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b48c24c2d710cf34810c555dcef883a3d35a9c08",
                            "lessThan": "8ecef7890b3aea78c8bbb501a4b5b8134367b821",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/infiniband/hw/irdma/verbs.c"
                    ],
                    "versions": [
                        {
                            "version": "5.14",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.14",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.61",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18.18",
                            "lessThanOrEqual": "5.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19.2",
                            "lessThanOrEqual": "5.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.14",
                                    "versionEndExcluding": "5.15.61"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.14",
                                    "versionEndExcluding": "5.18.18"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.14",
                                    "versionEndExcluding": "5.19.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.14",
                                    "versionEndExcluding": "6.0"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/92520864ef9f912f38b403d172a0ded020683d55"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0abf2eef80295923b819ce89ff9edc1fe61be17c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/350ac793a03c8a30a3f2b27fc282cd1c67070763"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8ecef7890b3aea78c8bbb501a4b5b8134367b821"
                }
            ],
            "title": "RDMA/irdma: Fix a window for use-after-free",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}