CVE-2026-46149
Received Received - Intake
Buffer Overflow in Linux Kernel SCSI Target Subsystem

Publication date: 2026-05-28

Last updated on: 2026-05-28

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: scsi: target: configfs: Bound snprintf() return in tg_pt_gp_members_show() target_tg_pt_gp_members_show() formats LUN paths with snprintf() into a 256-byte stack buffer, then will memcpy() cur_len bytes from that buffer. snprintf() returns the length the output would have had, which can exceed the buffer size when the fabric WWN is long because iSCSI IQN names can be up to 223 bytes. The check at the memcpy() site only guards the destination page write, not the source read, so memcpy() will read past the stack buffer and copy adjacent stack contents to the sysfs reader, which when CONFIG_FORTIFY_SOURCE is enabled, fortify_panic() will be triggered. Commit 27e06650a5ea ("scsi: target: target_core_configfs: Add length check to avoid buffer overflow") added the same bound to the target_lu_gp_members_show() but the tg_pt_gp variant was missed so resolve that here.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-28
Last Modified
2026-05-28
Generated
2026-05-28
AI Q&A
2026-05-28
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's SCSI target configfs code, specifically in the function tg_pt_gp_members_show(). This function uses snprintf() to format LUN paths into a fixed 256-byte stack buffer. However, snprintf() returns the length the output would have had, which can be larger than the buffer size if the fabric WWN is long, because iSCSI IQN names can be up to 223 bytes.

After snprintf(), memcpy() copies cur_len bytes from the buffer, but the check only protects the destination buffer, not the source buffer. This means memcpy() can read beyond the 256-byte stack buffer and copy adjacent stack memory contents to the sysfs reader. When CONFIG_FORTIFY_SOURCE is enabled, this out-of-bounds read triggers fortify_panic(), causing a kernel panic.

The vulnerability was due to missing a length bound check in tg_pt_gp_members_show(), which was added to a similar function target_lu_gp_members_show() in a previous commit but missed here.


How can this vulnerability impact me? :

This vulnerability can cause a kernel panic due to an out-of-bounds read in the stack buffer when reading certain sysfs entries related to SCSI target LUN paths. This can lead to denial of service (DoS) by crashing the system.

Additionally, because memcpy() reads beyond the intended buffer, it may expose adjacent stack memory contents to the sysfs reader, potentially leaking sensitive kernel stack data.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability has been resolved by adding a length check to avoid buffer overflow in the Linux kernel's scsi target configfs code. To mitigate this vulnerability, you should update your Linux kernel to a version that includes the fix for CVE-2026-46149.

Specifically, ensure your kernel includes the commit 27e06650a5ea which adds the necessary bounds check to the target_tg_pt_gp_members_show() function.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart