# CVE-2025-40355: sysfs: check visibility before changing group attribute ownership

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-12-16T13:30:28.017Z
- **Modified:** 2026-10-21T13:18:20.410Z

## Who should check

- Anyone running Linux \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< ac2c526e103285d80a0330b91a318f6c9276d35a; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33
- Anyone running Linux 5.7

## Description

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

sysfs: check visibility before changing group attribute ownership

Since commit 0c17270f9b92 ("net: sysfs: Implement is\_visible for
phys\_(port\_id, port\_name, switch\_id)"), \_\_dev\_change\_net\_namespace() can
hit WARN\_ON() when trying to change owner of a file that isn't visible.
See the trace below:

 WARNING: CPU: 6 PID: 2938 at net/core/dev.c:12410 \_\_dev\_change\_net\_namespace+0xb89/0xc30
 CPU: 6 UID: 0 PID: 2938 Comm: incusd Not tainted 6.17.1-1-mainline \#1 PREEMPT(full)  4b783b4a638669fb644857f484487d17cb45ed1f
 Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.07 02/19/2025
 RIP: 0010:\_\_dev\_change\_net\_namespace+0xb89/0xc30
 \[...\]
 Call Trace:
  \<TASK\>
  ? if6\_seq\_show+0x30/0x50
  do\_setlink.isra.0+0xc7/0x1270
  ? \_\_nla\_validate\_parse+0x5c/0xcc0
  ? security\_capable+0x94/0x1a0
  rtnl\_newlink+0x858/0xc20
  ? update\_curr+0x8e/0x1c0
  ? update\_entity\_lag+0x71/0x80
  ? sched\_balance\_newidle+0x358/0x450
  ? psi\_task\_switch+0x113/0x2a0
  ? \_\_pfx\_rtnl\_newlink+0x10/0x10
  rtnetlink\_rcv\_msg+0x346/0x3e0
  ? sched\_clock+0x10/0x30
  ? \_\_pfx\_rtnetlink\_rcv\_msg+0x10/0x10
  netlink\_rcv\_skb+0x59/0x110
  netlink\_unicast+0x285/0x3c0
  ? \_\_alloc\_skb+0xdb/0x1a0
  netlink\_sendmsg+0x20d/0x430
  \_\_\_\_sys\_sendmsg+0x39f/0x3d0
  ? import\_iovec+0x2f/0x40
  \_\_\_sys\_sendmsg+0x99/0xe0
  \_\_sys\_sendmsg+0x8a/0xf0
  do\_syscall\_64+0x81/0x970
  ? \_\_sys\_bind+0xe3/0x110
  ? syscall\_exit\_work+0x143/0x1b0
  ? do\_syscall\_64+0x244/0x970
  ? sock\_alloc\_file+0x63/0xc0
  ? syscall\_exit\_work+0x143/0x1b0
  ? do\_syscall\_64+0x244/0x970
  ? alloc\_fd+0x12e/0x190
  ? put\_unused\_fd+0x2a/0x70
  ? do\_sys\_openat2+0xa2/0xe0
  ? syscall\_exit\_work+0x143/0x1b0
  ? do\_syscall\_64+0x244/0x970
  ? exc\_page\_fault+0x7e/0x1a0
  entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
 \[...\]
  \</TASK\>

Fix this by checking is\_visible() before trying to touch the attribute.

## Affected and fixed versions

- Linux: \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< ac2c526e103285d80a0330b91a318f6c9276d35a; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33 (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-40355.md
Affected: Linux >= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, < 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819; >= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, < ac2c526e103285d80a0330b91a318f6c9276d35a; >= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, < c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33; Linux 5.7
Fixed in: Linux 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819

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-40355 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< ac2c526e103285d80a0330b91a318f6c9276d35a; \>= 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60, \< c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33; Linux 5.7.

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

Yes. Fixed in Linux 5e963b5aca9c1c23f7a040d555a9bc21c0ab8819. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/5e963b5aca9c1c23f7a040d555a9bc21c0ab8819>
- other: <https://git.kernel.org/stable/c/ac2c526e103285d80a0330b91a318f6c9276d35a>
- other: <https://git.kernel.org/stable/c/c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33>

## 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-40355>

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