CVE-2025-68229: scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show()
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: tcmloop: Fix segfault in tcmlooptpgaddressshow()
If the allocation of tlhba->sh fails in tcmloopdriverprobe() and we attempt to dereference it in tcmlooptpgaddressshow() we will get a segfault, see below for an example. So, check tlhba->sh before dereferencing it.
Unable to allocate struct scsihost BUG: kernel NULL pointer dereference, address: 0000000000000194 #PF: supervisor read access in kernel mode #PF: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 8356 Comm: tokio-runtime-w Not tainted 6.6.104.2-4.azl3 #1 Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 09/28/2024 RIP: 0010:tcmlooptpgaddressshow+0x2e/0x50 [tcmloop] ... Call Trace: <TASK> configfsreaditer+0x12d/0x1d0 [configfs] vfsread+0x1b5/0x300 ksysread+0x6f/0xf0 ...
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Modify tcm_loop_tpg_address_show() to check tl_hba->sh for NULL (e.g., if (!tl_hba->sh) return or handle gracefully) before dereferencing it.
tcm_loop (Linux kernel) tl_hba->sh null check = ensure tl_hba->sh is non-NULL before dereference
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68229?
CVE-2025-68229 has a moderate severity level due to its potential to cause a segmentation fault.
How does CVE-2025-68229 affect the Linux kernel?
CVE-2025-68229 affects the Linux kernel by potentially causing segmentation faults when improperly handling certain memory allocations.
How do I fix CVE-2025-68229?
To fix CVE-2025-68229, ensure you are running the latest patched version of the Linux kernel where this vulnerability has been resolved.
Which versions of the Linux kernel are affected by CVE-2025-68229?
CVE-2025-68229 affects various versions of the Linux kernel that include the vulnerable code.
What is the impact of CVE-2025-68229 on system stability?
The impact of CVE-2025-68229 on system stability could include unexpected crashes if the vulnerability is exploited.