CVE-2025-38675

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38675
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38675.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38675
Downstream
Published
2025-08-22T16:04:12.688Z
Modified
2025-11-27T19:34:15.722244Z
Summary
xfrm: state: initialize state_ptrs earlier in xfrm_state_find
Details

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

xfrm: state: initialize stateptrs earlier in xfrmstate_find

In case of preemption, xfrmstatelookat will find a different pcpuid and look up states for that other CPU. If we matched a state for CPU2 in the statecache while the lookup started on CPU1, we will jump to "found", but the "best" state that we got will be ignored and we will enter the "acquire" block. This block uses stateptrs, which isn't initialized at this point.

Let's initialize stateptrs just after taking rcuread_lock. This will also prevent a possible misuse in the future, if someone adjusts this function.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/ee626f5d79d5817bb21d6f048dc0da4c4e383443/cves/2025/38xxx/CVE-2025-38675.json",
    "cna_assigner": "Linux"
}
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
a16871c7832ea6435abb6e0b58289ae7dcb7e4fc
Fixed
6bf2daafc51bcb9272c0fdff2afd38217337d0d3
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e952837f3ddb0ff726d5b582aa1aad9aa38d024d
Fixed
463562f9591742be62ddde3b426a0533ed496955
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e952837f3ddb0ff726d5b582aa1aad9aa38d024d
Fixed
94d077c331730510d5611b438640a292097341f0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
dd4c2a174994238d55ab54da2545543d36f4e0d0

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.41
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.15.9