# CVE-2025-21654: ovl: support encoding fid from inode with no alias

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-01-19T10:18:11.104Z
- Modified: 2026-06-17T08:43:56.680Z
- Weaknesses: CWE-617
- Assigned by: Linux

## Description

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

ovl: support encoding fid from inode with no alias

Dmitry Safonov reported that a WARN_ON() assertion can be trigered by
userspace when calling inotify_show_fdinfo() for an overlayfs watched
inode, whose dentry aliases were discarded with drop_caches.

The WARN_ON() assertion in inotify_show_fdinfo() was removed, because
it is possible for encoding file handle to fail for other reason, but
the impact of failing to encode an overlayfs file handle goes beyond
this assertion.

As shown in the LTP test case mentioned in the link below, failure to
encode an overlayfs file handle from a non-aliased inode also leads to
failure to report an fid with FAN_DELETE_SELF fanotify events.

As Dmitry notes in his analyzis of the problem, ovl_encode_fh() fails
if it cannot find an alias for the inode, but this failure can be fixed.
ovl_encode_fh() seldom uses the alias and in the case of non-decodable
file handles, as is often the case with fanotify fid info,
ovl_encode_fh() never needs to use the alias to encode a file handle.

Defer finding an alias until it is actually needed so ovl_encode_fh()
will not fail in the common case of FAN_DELETE_SELF fanotify events.

(As written by CVE List.)

## Affected

- Linux Linux: from 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before f0c0ac84de17c37e6e84da65fb920f91dada55ad; from 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before 3c7c90274ae339e1ad443c9be1c67a20b80b9c76; from 16aac5ad1fa94894b798dd522c5c3a6a0628d7f0 before c45beebfde34aa71afbc48b2c54cdda623515037; 6.6 (not affected: before 6.6; from 6.6.74 up to 6.6.*; from 6.12.10 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.6 before 6.6.74; from 6.7 before 6.12.10; 6.13

## References

- <https://git.kernel.org/stable/c/f0c0ac84de17c37e6e84da65fb920f91dada55ad> (patch)
- <https://git.kernel.org/stable/c/3c7c90274ae339e1ad443c9be1c67a20b80b9c76> (patch)
- <https://git.kernel.org/stable/c/c45beebfde34aa71afbc48b2c54cdda623515037> (patch)

## Sources

- CVE List: [CVE-2025-21654](https://www.cve.org/CVERecord?id=CVE-2025-21654), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-21654](https://nvd.nist.gov/vuln/detail/CVE-2025-21654), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-21654 · Whole record: https://cve.day/CVE-2025-21654.json · Rebuilt by cve.day 2026-11-25T22:58:53.439Z
