{"id":"CVE-2022-50129","aliases":["CVE-2022-50129"],"related":[],"kind":"vulnerability","state":"published","title":"RDMA/srpt: Fix a use-after-free","summary":"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>","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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>","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: RDMA/srpt: Se corrige un problema de use-after-free. Se cambian los miembros del puerto LIO dentro de struct srpt_port de miembros regulares a punteros. Se asignan las estructuras de datos del puerto LIO desde srpt_make_tport() y se liberan desde srpt_make_tport(). Se mantiene struct srpt_device mientras un puerto RDMA o un puerto de destino LIO esté asociado a él. Este parche desacopla la duración de struct srpt_port (controlado por el núcleo RDMA) y struct srpt_port_id (controlado por LIO). Este parche corrige la siguiente queja de KASAN: ERROR: KASAN: Use-After-Free en srpt_enable_tpg+0x31/0x70 [ib_srpt] Lectura de tamaño 8 en la dirección ffff888141cc34b8 por la tarea check/5093 Rastreo de llamadas:  show_stack+0x4e/0x53 dump_stack_lvl+0x51/0x66 print_address_description.constprop.0.cold+0xea/0x41e print_report.cold+0x90/0x205 kasan_report+0xb9/0xf0 __asan_load8+0x69/0x90 srpt_enable_tpg+0x31/0x70 [ib_srpt] target_fabric_tpg_base_enable_store+0xe2/0x140 [target_core_mod] configfs_write_iter+0x18b/0x210 new_sync_write+0x1f2/0x2f0 vfs_write+0x3e3/0x540 ksys_write+0xbb/0x140 __x64_sys_write+0x42/0x50 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0","source":"nvd"}],"published":"2025-06-18T11:02:55.576Z","modified":"2026-08-05T08:57:28.156Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","fixed":"de95b52d9aabc979166aba81ccbe623aaf9c16a1","status":"affected"},{"type":"git","introduced":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","fixed":"e60d7e2462bf57273563c4e00dbfa79ee973b9e2","status":"affected"},{"type":"git","introduced":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","fixed":"4ee8c39968a648d58b273582d4b021044a41ee5e","status":"affected"},{"type":"git","introduced":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","fixed":"388326bb1c32fcd09371c1d494af71471ef3a04b","status":"affected"},{"type":"git","introduced":"a42d985bd5b234da8b61347a78dc3057bf7bb94d","fixed":"b5605148e6ce36bb21020d49010b617693933128","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.3","status":"unaffected"},{"type":"semver","introduced":"5.10.137","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.61","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.18.18","lastAffected":"5.18.*","status":"unaffected"},{"type":"semver","introduced":"5.19.2","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.3","fixed":"5.10.137"},{"status":"affected","introduced":"5.11","fixed":"5.15.61"},{"status":"affected","introduced":"5.16","fixed":"5.18.18"},{"status":"affected","introduced":"5.19","fixed":"5.19.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/de95b52d9aabc979166aba81ccbe623aaf9c16a1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e60d7e2462bf57273563c4e00dbfa79ee973b9e2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4ee8c39968a648d58b273582d4b021044a41ee5e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/388326bb1c32fcd09371c1d494af71471ef3a04b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b5605148e6ce36bb21020d49010b617693933128","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50129","url":"https://www.cve.org/CVERecord?id=CVE-2022-50129","licence":"CVE Terms of Use","modified":"2026-08-05T08:57:28.156Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50129","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50129","licence":"Public domain","modified":"2026-08-04T10:18:05.503Z"}],"updatedAt":"2026-11-25T22:58:21.067Z","epss":{"score":0.00197,"percentile":0.09849,"date":"2026-12-01T12:00:22.000Z"}}