Skip to content

[ciqlts9_2] scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count()#1185

Merged
roxanan1996 merged 1 commit into
ciqlts9_2from
{rnicolescu}_ciqlts9_2
May 7, 2026
Merged

[ciqlts9_2] scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count()#1185
roxanan1996 merged 1 commit into
ciqlts9_2from
{rnicolescu}_ciqlts9_2

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count()

jira VULN-176313
cve CVE-2026-23193
commit-author Maurizio Lombardi <mlombard@redhat.com>
commit 84dc6037390b8607c5551047d3970336cb51ba9a

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 23m 4s 23m 52s
aarch64 12m 22s 12m 58s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 174 24 ciqlts9_2 ✅ No regressions
aarch64 140 28 ciqlts9_2 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1439 81 ciqlts9_2 ✅ No regressions
aarch64 1409 83 ciqlts9_2 ✅ No regressions

🤖 This PR was automatically generated by GitHub Actions
Run ID: 25425962752

…ount()

jira VULN-176313
cve CVE-2026-23193
commit-author Maurizio Lombardi <mlombard@redhat.com>
commit 84dc603

In iscsit_dec_session_usage_count(), the function calls complete() while
holding the sess->session_usage_lock. Similar to the connection usage count
logic, the waiter signaled by complete() (e.g., in the session release
path) may wake up and free the iscsit_session structure immediately.

This creates a race condition where the current thread may attempt to
execute spin_unlock_bh() on a session structure that has already been
deallocated, resulting in a KASAN slab-use-after-free.

To resolve this, release the session_usage_lock before calling complete()
to ensure all dereferences of the sess pointer are finished before the
waiter is allowed to proceed with deallocation.

	Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
	Reported-by: Zhaojuan Guo <zguo@redhat.com>
	Reviewed-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260112165352.138606-3-mlombard@redhat.com
	Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 84dc603)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label May 6, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/25437410869

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/25437410869

@roxanan1996 roxanan1996 requested a review from a team May 6, 2026 13:32

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@bmastbergen bmastbergen requested a review from a team May 6, 2026 16:06
@roxanan1996 roxanan1996 merged commit 441c7ea into ciqlts9_2 May 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

3 participants