CVE-2025-39998

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

7.1 high EPSS 0.18%

Published 15 Oct 2025 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2025-39998

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-39998 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

7.1 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.18%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.64% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 15 Oct 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before e6eeee5dc0d9221ff96d1b229b1d0222c8871b84
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before 764a91e2fc9639e07aac93bc70e387e6b1e33084
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before ddc79fba132b807ff775467acceaf48b456e008b
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before e73fe0eefac3e15bf88fb5b4afae4c76215ee4d4
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before f03aa5e39da7d045615b3951d2a6ca1d7132f881
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before 53c6351597e6a17ec6619f6f060d54128cb9a187
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before 4b292286949588bd2818e66ff102db278de8dd26
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before a150275831b765b0f1de8b8ff52ec5c6933ac15d
affected from c66ac9db8d4ad9994a02b3e933ea2ccc643e1fe5, before 27e06650a5eafe832a90fd2604f0c5e920857fae
Other versions: unaffected
Linux
affected 2.6.38
unaffected before 2.6.38
unaffected from 5.4.301 up to and including 5.4.*
unaffected from 5.10.246 up to and including 5.10.*
unaffected from 5.15.195 up to and including 5.15.*
unaffected from 6.1.156 up to and including 6.1.*
unaffected from 6.6.110 up to and including 6.6.*
unaffected from 6.12.51 up to and including 6.12.*
unaffected from 6.16.11 up to and including 6.16.*
unaffected from 6.17.1 up to and including 6.17.*
unaffected 6.18 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-39998 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-39998

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-39998
trivy image --scanners vuln IMAGE | grep CVE-2025-39998

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-39998 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.