# CVE-2025-38417: ice: fix eswitch code memory leak in reset scenario

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.26% (percentile 11, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-07-25T14:05:41.821Z
- **Modified:** 2026-11-05T21:18:30.750Z

## Who should check

- Anyone running Linux \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< d6715193de439b79f1d6a4c03593c7529239b545; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< e97a7a051b55f55f276c1568491d0ed7f890ee94; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< 48c8b214974dc55283bd5f12e3a483b27c403bbc
- Anyone running Linux 6.12

## Description

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

ice: fix eswitch code memory leak in reset scenario

Add simple eswitch mode checker in attaching VF procedure and allocate
required port representor memory structures only in switchdev mode.
The reset flows triggers VF (if present) detach/attach procedure.
It might involve VF port representor(s) re-creation if the device is
configured is switchdev mode (not legacy one).
The memory was blindly allocated in current implementation,
regardless of the mode and not freed if in legacy mode.

Kmemeleak trace:
unreferenced object (percpu) 0x7e3bce5b888458 (size 40):
  comm "bash", pid 1784, jiffies 4295743894
  hex dump (first 32 bytes on cpu 45):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace (crc 0):
    pcpu\_alloc\_noprof+0x4c4/0x7c0
    ice\_repr\_create+0x66/0x130 \[ice\]
    ice\_repr\_create\_vf+0x22/0x70 \[ice\]
    ice\_eswitch\_attach\_vf+0x1b/0xa0 \[ice\]
    ice\_reset\_all\_vfs+0x1dd/0x2f0 \[ice\]
    ice\_pci\_err\_resume+0x3b/0xb0 \[ice\]
    pci\_reset\_function+0x8f/0x120
    reset\_store+0x56/0xa0
    kernfs\_fop\_write\_iter+0x120/0x1b0
    vfs\_write+0x31c/0x430
    ksys\_write+0x61/0xd0
    do\_syscall\_64+0x5b/0x180
    entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

Testing hints (ethX is PF netdev):
- create at least one VF
    echo 1 \> /sys/class/net/ethX/device/sriov\_numvfs
- trigger the reset
    echo 1 \> /sys/class/net/ethX/device/reset

## Affected and fixed versions

- Linux: \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< d6715193de439b79f1d6a4c03593c7529239b545; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< e97a7a051b55f55f276c1568491d0ed7f890ee94; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< 48c8b214974dc55283bd5f12e3a483b27c403bbc (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

- Upgrade Linux to 48c8b214974dc55283bd5f12e3a483b27c403bbc or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38417. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38417.md
Affected: Linux >= 415db8399d06a45ebd7b7d26b951f831a4b01801, < d6715193de439b79f1d6a4c03593c7529239b545; >= 415db8399d06a45ebd7b7d26b951f831a4b01801, < e97a7a051b55f55f276c1568491d0ed7f890ee94; >= 415db8399d06a45ebd7b7d26b951f831a4b01801, < 48c8b214974dc55283bd5f12e3a483b27c403bbc; Linux 6.12
Fixed in: Linux 48c8b214974dc55283bd5f12e3a483b27c403bbc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38417 being exploited?

There is no confirmed exploitation: CVE-2025-38417 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-38417?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38417?

Linux \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< d6715193de439b79f1d6a4c03593c7529239b545; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< e97a7a051b55f55f276c1568491d0ed7f890ee94; \>= 415db8399d06a45ebd7b7d26b951f831a4b01801, \< 48c8b214974dc55283bd5f12e3a483b27c403bbc; Linux 6.12.

### Is there a fix for CVE-2025-38417?

Yes. Fixed in Linux 48c8b214974dc55283bd5f12e3a483b27c403bbc. Upgrade Linux to 48c8b214974dc55283bd5f12e3a483b27c403bbc or later.

### How do I check if I'm affected by CVE-2025-38417?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d6715193de439b79f1d6a4c03593c7529239b545>
- patch: <https://git.kernel.org/stable/c/e97a7a051b55f55f276c1568491d0ed7f890ee94>
- patch: <https://git.kernel.org/stable/c/48c8b214974dc55283bd5f12e3a483b27c403bbc>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38417>

HTML: <https://flawdb.com/CVE-2025-38417> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38417>
