CVE-2025-39998

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-39998
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39998.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39998
Downstream
Related
Published
2025-10-15T07:58:22.354Z
Modified
2025-11-28T02:34:17.064767Z
Summary
scsi: target: target_core_configfs: Add length check to avoid buffer overflow
Details

In the Linux kernel, the following vulnerability has been resolved:

scsi: target: targetcoreconfigfs: Add length check to avoid buffer overflow

A buffer overflow arises from the usage of snprintf to write into the buffer "buf" in targetlugpmembersshow function located in /drivers/target/targetcoreconfigfs.c. This buffer is allocated with size LUGROUPNAME_BUF (256 bytes).

snprintf(...) formats multiple strings into buf with the HBA name (hba->hbagroup.cgitem), a slash character, a devicename (dev-> devgroup.cgitem) 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39998.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
e6eeee5dc0d9221ff96d1b229b1d0222c8871b84
Fixed
764a91e2fc9639e07aac93bc70e387e6b1e33084
Fixed
ddc79fba132b807ff775467acceaf48b456e008b
Fixed
e73fe0eefac3e15bf88fb5b4afae4c76215ee4d4
Fixed
f03aa5e39da7d045615b3951d2a6ca1d7132f881
Fixed
53c6351597e6a17ec6619f6f060d54128cb9a187
Fixed
4b292286949588bd2818e66ff102db278de8dd26
Fixed
a150275831b765b0f1de8b8ff52ec5c6933ac15d
Fixed
27e06650a5eafe832a90fd2604f0c5e920857fae

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39998.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.4.301
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.246
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.195
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.156
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.110
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.51
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.16.11
Type
ECOSYSTEM
Events
Introduced
6.17.0
Fixed
6.17.1

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39998.json"