{"id":"CVE-2023-52974","state":"PUBLISHED","title":"scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress\n\nIf during iscsi_sw_tcp_session_create() iscsi_tcp_r2tpool_alloc() fails,\nuserspace could be accessing the host's ipaddress attr. If we then free the\nsession via iscsi_session_teardown() while userspace is still accessing the\nsession we will hit a use after free bug.\n\nSet the tcp_sw_host->session after we have completed session creation and\ncan no longer fail.","publishedAt":"2025-03-27T16:43:13.792Z","updatedAt":"2026-08-05T09:12:12.182Z","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":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"496af9d3682ed4c28fb734342a09e6cc0c056ea4","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"6abd4698f4c8a78e7bbfc421205c060c199554a0","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"d4d765f4761f9e3a2d62992f825aeee593bcb6b9","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"9758ffe1c07b86aefd7ca8e40d9a461293427ca0","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"0aaabdb900c7415caa2006ef580322f7eac5f6b6","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"61e43ebfd243bcbad11be26bd921723027b77441","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"f484a794e4ee2a9ce61f52a78e810ac45f3fe3b3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/iscsi_tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.39","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.39","versionType":"semver"},{"version":"4.14.306","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.273","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.232","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.168","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.93","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.11","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/iscsi_tcp.c"]}],"references":["https://git.kernel.org/stable/c/496af9d3682ed4c28fb734342a09e6cc0c056ea4","https://git.kernel.org/stable/c/6abd4698f4c8a78e7bbfc421205c060c199554a0","https://git.kernel.org/stable/c/d4d765f4761f9e3a2d62992f825aeee593bcb6b9","https://git.kernel.org/stable/c/9758ffe1c07b86aefd7ca8e40d9a461293427ca0","https://git.kernel.org/stable/c/0aaabdb900c7415caa2006ef580322f7eac5f6b6","https://git.kernel.org/stable/c/61e43ebfd243bcbad11be26bd921723027b77441","https://git.kernel.org/stable/c/f484a794e4ee2a9ce61f52a78e810ac45f3fe3b3"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52974.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52974","state":"PUBLISHED","datePublished":"2025-03-27T16:43:13.792Z","dateUpdated":"2026-08-05T09:12:12.182Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-03-27T16:40:15.737Z"},"containers":{"cna":{"title":"scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress\n\nIf during iscsi_sw_tcp_session_create() iscsi_tcp_r2tpool_alloc() fails,\nuserspace could be accessing the host's ipaddress attr. If we then free the\nsession via iscsi_session_teardown() while userspace is still accessing the\nsession we will hit a use after free bug.\n\nSet the tcp_sw_host->session after we have completed session creation and\ncan no longer fail."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"496af9d3682ed4c28fb734342a09e6cc0c056ea4","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"6abd4698f4c8a78e7bbfc421205c060c199554a0","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"d4d765f4761f9e3a2d62992f825aeee593bcb6b9","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"9758ffe1c07b86aefd7ca8e40d9a461293427ca0","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"0aaabdb900c7415caa2006ef580322f7eac5f6b6","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"61e43ebfd243bcbad11be26bd921723027b77441","versionType":"git"},{"version":"a79af8a64d395bd89de8695a5ea5e1a7f01f02a8","status":"affected","lessThan":"f484a794e4ee2a9ce61f52a78e810ac45f3fe3b3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/iscsi_tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.39","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.39","versionType":"semver"},{"version":"4.14.306","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.273","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.232","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.168","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.93","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.11","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/iscsi_tcp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/496af9d3682ed4c28fb734342a09e6cc0c056ea4"},{"url":"https://git.kernel.org/stable/c/6abd4698f4c8a78e7bbfc421205c060c199554a0"},{"url":"https://git.kernel.org/stable/c/d4d765f4761f9e3a2d62992f825aeee593bcb6b9"},{"url":"https://git.kernel.org/stable/c/9758ffe1c07b86aefd7ca8e40d9a461293427ca0"},{"url":"https://git.kernel.org/stable/c/0aaabdb900c7415caa2006ef580322f7eac5f6b6"},{"url":"https://git.kernel.org/stable/c/61e43ebfd243bcbad11be26bd921723027b77441"},{"url":"https://git.kernel.org/stable/c/f484a794e4ee2a9ce61f52a78e810ac45f3fe3b3"}],"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 via local iSCSI initiator session creation (NETLINK_ISCSI) and concurrent local sysfs reads of the host ipaddress attribute, not by processing packets from a remote peer.\nAC:L - The attacker can induce memory pressure so iscsi_tcp_r2tpool_alloc() fails and concurrently hammer the world-readable sysfs ipaddress path, controlling the reader side of the race (and both sides if also creating sessions).\nPR:L - show_host_param_ISCSI_HOST_PARAM_IPADDRESS is S_IRUGO with no capability check, so an unprivileged local user can trigger the UAF while iscsid performs session create; CAP_SYS_ADMIN is only required for the netlink create side, not the sysfs exploit path.\nUI:N - No separate victim user action is required; the attacker only needs to read sysfs while session creation/teardown occurs on the system.\nS:U - This is a standard in-kernel UAF/privilege-escalation impact within the same host security authority, with no VM, IOMMU, or other cross-boundary escape.\nC:H - The UAF lets userspace operate on a freed iscsi_session (including lock and field access), which can be turned into an arbitrary kernel read via heap reuse.\nI:H - The UAF path takes spin_lock_bh on freed session memory (write to freed object), enabling heap spraying and control-flow hijacking primitives.\nA:H - Dereferencing/locking the freed session causes kernel oops/panic as demonstrated by the related KASAN UAF report, so availability impact is high."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:12:12.182Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"4.14.306"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"4.19.273"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.4.232"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.10.168"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"5.15.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"6.1.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.39","versionEndExcluding":"6.2"}]}]}],"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-2023-52974","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-03-27T16:59:50.791219Z"}}}],"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-03-27T17:08:22.573Z"}}]}}}