{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50129",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-06-18T10:57:27.418Z",
        "datePublished": "2025-06-18T11:02:55.576Z",
        "dateUpdated": "2026-08-05T08:57:28.156Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:57:28.156Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/srpt: Fix a use-after-free\n\nChange the LIO port members inside struct srpt_port from regular members\ninto pointers. Allocate the LIO port data structures from inside\nsrpt_make_tport() and free these from inside srpt_make_tport(). Keep\nstruct srpt_device as long as either an RDMA port or a LIO target port is\nassociated with it. This patch decouples the lifetime of struct srpt_port\n(controlled by the RDMA core) and struct srpt_port_id (controlled by LIO).\nThis patch fixes the following KASAN complaint:\n\n  BUG: KASAN: use-after-free in srpt_enable_tpg+0x31/0x70 [ib_srpt]\n  Read of size 8 at addr ffff888141cc34b8 by task check/5093\n\n  Call Trace:\n   <TASK>\n   show_stack+0x4e/0x53\n   dump_stack_lvl+0x51/0x66\n   print_address_description.constprop.0.cold+0xea/0x41e\n   print_report.cold+0x90/0x205\n   kasan_report+0xb9/0xf0\n   __asan_load8+0x69/0x90\n   srpt_enable_tpg+0x31/0x70 [ib_srpt]\n   target_fabric_tpg_base_enable_store+0xe2/0x140 [target_core_mod]\n   configfs_write_iter+0x18b/0x210\n   new_sync_write+0x1f2/0x2f0\n   vfs_write+0x3e3/0x540\n   ksys_write+0xbb/0x140\n   __x64_sys_write+0x42/0x50\n   do_syscall_64+0x34/0x80\n   entry_SYSCALL_64_after_hwframe+0x46/0xb0\n   </TASK>"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "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"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The UAF is reached through local configfs operations on the LIO/srpt target hierarchy (enable store as in the KASAN report, and world-readable TPG attrib show handlers that call srpt_tpg_to_sport), not via remote SRP/RDMA connection processing.\nAC:H - The use-after-free only appears after srpt_remove_one frees struct srpt_port (RDMA device unbind/hot-remove/module teardown) while LIO configfs still holds references into the embedded srpt_port_id/se_wwn; an unprivileged attacker cannot induce that RDMA lifetime transition.\nPR:L - After the dangling state exists, CONFIGFS_ATTR show handlers such as srpt_tpg_attrib_*_show are mode S_IRUGO and dereference the freed sport via wwn->priv, so a normal unprivileged local user can trigger the UAF by reading those attributes without root or init-namespace capabilities.\nUI:N - Exploitation is just reading or writing the already-present configfs attributes; no separate victim action such as mounting a filesystem or opening a user-supplied file is required.\nS:U - This is a standard in-kernel use-after-free within the host kernel’s authority and does not cross a VM, IOMMU, or other security-authority boundary.\nC:H - Use-after-free of srpt_port/srpt_port_id lets an attacker reuse the freed object and obtain arbitrary kernel read primitives, so confidentiality impact is High under kernel UAF guidance.\nI:H - The same heap UAF is exploitable via spraying/reallocation for corruption of kernel objects and control-flow hijacking, so integrity impact is High.\nA:H - The demonstrated KASAN use-after-free in srpt_enable_tpg and equivalent dangling dereferences in attrib paths can oops/panic the kernel, so availability impact is High."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/infiniband/ulp/srpt/ib_srpt.c",
                        "drivers/infiniband/ulp/srpt/ib_srpt.h"
                    ],
                    "versions": [
                        {
                            "version": "a42d985bd5b234da8b61347a78dc3057bf7bb94d",
                            "lessThan": "de95b52d9aabc979166aba81ccbe623aaf9c16a1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a42d985bd5b234da8b61347a78dc3057bf7bb94d",
                            "lessThan": "e60d7e2462bf57273563c4e00dbfa79ee973b9e2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a42d985bd5b234da8b61347a78dc3057bf7bb94d",
                            "lessThan": "4ee8c39968a648d58b273582d4b021044a41ee5e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a42d985bd5b234da8b61347a78dc3057bf7bb94d",
                            "lessThan": "388326bb1c32fcd09371c1d494af71471ef3a04b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a42d985bd5b234da8b61347a78dc3057bf7bb94d",
                            "lessThan": "b5605148e6ce36bb21020d49010b617693933128",
                            "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/ulp/srpt/ib_srpt.c",
                        "drivers/infiniband/ulp/srpt/ib_srpt.h"
                    ],
                    "versions": [
                        {
                            "version": "3.3",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.3",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.137",
                            "lessThanOrEqual": "5.10.*",
                            "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": "3.3",
                                    "versionEndExcluding": "5.10.137"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.3",
                                    "versionEndExcluding": "5.15.61"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.3",
                                    "versionEndExcluding": "5.18.18"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.3",
                                    "versionEndExcluding": "5.19.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.3",
                                    "versionEndExcluding": "6.0"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/de95b52d9aabc979166aba81ccbe623aaf9c16a1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e60d7e2462bf57273563c4e00dbfa79ee973b9e2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/4ee8c39968a648d58b273582d4b021044a41ee5e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/388326bb1c32fcd09371c1d494af71471ef3a04b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b5605148e6ce36bb21020d49010b617693933128"
                }
            ],
            "title": "RDMA/srpt: Fix a use-after-free",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}