In the Linux kernel, the following vulnerability has been resolved: scsi: target: target_core_configfs: Add length check to avoid buffer overflow A… (CVE-2025-39998)
In the Linux kernel, the following vulnerability has been resolved: scsi: target: target_core_configfs: Add length check to avoid buffer overflow A buffer overflow arises from the usage of snprintf to write into the buffer "buf" in target_lu_gp_members_show function located in /drivers/target/target_core_configfs.c. This buffer is allocated with size LU_GROUP_NAME_BUF (256 bytes). snprintf(...) formats multiple strings into buf with the HBA name (hba->hba_group.cg_item), a slash character, a devicename (dev-> dev_group.cg_item) and a newline character, the total formatted string length may exceed the buffer size of 256 bytes. Since snprintf() returns the total number of bytes that would have been written (the length of %s/%sn ), this value may exceed the buffer length (256 bytes) passed to memcpy(), this will ultimately cause function memcpy reporting a buffer overflow error. An additional check of the return value of snprintf() can avoid this buffer overflow.
AI Analysis
Technical Summary
CVE-2025-39998 describes a buffer overflow vulnerability in the Linux kernel's target_core_configfs driver, specifically in the target_lu_gp_members_show function. The function uses snprintf to format a string containing HBA and device names into a fixed-size 256-byte buffer. Since snprintf returns the total length of the formatted string regardless of truncation, the subsequent memcpy call uses this length without verifying it fits in the buffer, causing a buffer overflow. The vulnerability is mitigated by adding a length check on snprintf's return value to prevent overflow.
Potential Impact
The vulnerability can lead to a buffer overflow condition in the kernel, which may result in denial of service (kernel crash) or potential exposure of sensitive information (confidentiality impact). The CVSS vector indicates local attack vector with low complexity and low privileges required, no user interaction, and high confidentiality and availability impact. There is no indication of known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability description states it has been resolved by adding a length check to avoid buffer overflow, implying an official fix exists. Users should monitor Linux kernel updates and apply the relevant patches once available. No additional mitigation steps are specified in the provided data.
In the Linux kernel, the following vulnerability has been resolved: scsi: target: target_core_configfs: Add length check to avoid buffer overflow A… (CVE-2025-39998)
Description
In the Linux kernel, the following vulnerability has been resolved: scsi: target: target_core_configfs: Add length check to avoid buffer overflow A buffer overflow arises from the usage of snprintf to write into the buffer "buf" in target_lu_gp_members_show function located in /drivers/target/target_core_configfs.c. This buffer is allocated with size LU_GROUP_NAME_BUF (256 bytes). snprintf(...) formats multiple strings into buf with the HBA name (hba->hba_group.cg_item), a slash character, a devicename (dev-> dev_group.cg_item) and a newline character, the total formatted string length may exceed the buffer size of 256 bytes. Since snprintf() returns the total number of bytes that would have been written (the length of %s/%sn ), this value may exceed the buffer length (256 bytes) passed to memcpy(), this will ultimately cause function memcpy reporting a buffer overflow error. An additional check of the return value of snprintf() can avoid this buffer overflow.
CVSS v3.1
Score 7.1high
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-39998 describes a buffer overflow vulnerability in the Linux kernel's target_core_configfs driver, specifically in the target_lu_gp_members_show function. The function uses snprintf to format a string containing HBA and device names into a fixed-size 256-byte buffer. Since snprintf returns the total length of the formatted string regardless of truncation, the subsequent memcpy call uses this length without verifying it fits in the buffer, causing a buffer overflow. The vulnerability is mitigated by adding a length check on snprintf's return value to prevent overflow.
Potential Impact
The vulnerability can lead to a buffer overflow condition in the kernel, which may result in denial of service (kernel crash) or potential exposure of sensitive information (confidentiality impact). The CVSS vector indicates local attack vector with low complexity and low privileges required, no user interaction, and high confidentiality and availability impact. There is no indication of known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability description states it has been resolved by adding a length check to avoid buffer overflow, implying an official fix exists. Users should monitor Linux kernel updates and apply the relevant patches once available. No additional mitigation steps are specified in the provided data.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h5vm-jvgf-qf7m
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-39998"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d79c2644c7f847b50a
Added to database: 07/30/2026, 15:50:47 UTC
Last enriched: 07/30/2026, 16:09:43 UTC
Last updated: 09/10/2026, 19:36:50 UTC
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.