CVE-2024-57924

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57924
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-57924.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-57924
Downstream
Related
Published
2025-01-19T11:52:42.458Z
Modified
2025-11-26T19:35:15.432994Z
Summary
fs: relax assertions on failure to encode file handles
Details

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

fs: relax assertions on failure to encode file handles

Encoding file handles is usually performed by a filesystem >encode_fh() method that may fail for various reasons.

The legacy users of exportfsencodefh(), namely, nfsd and nametohandle_at(2) syscall are ready to cope with the possibility of failure to encode a file handle.

There are a few other users of exportfsencode{fh,fid}() that currently have a WARNON() assertion when ->encodefh() fails. Relax those assertions because they are wrong.

The second linked bug report states commit 16aac5ad1fa9 ("ovl: support encoding non-decodable file handles") in v6.6 as the regressing commit, but this is not accurate.

The aforementioned commit only increases the chances of the assertion and allows triggering the assertion with the reproducer using overlayfs, inotify and drop_caches.

Triggering this assertion was always possible with other filesystems and other reasons of ->encodefh() failures and more particularly, it was also possible with the exact same reproducer using overlayfs that is mounted with options index=on,nfsexport=on also on kernels < v6.6. Therefore, I am not listing the aforementioned commit as a Fixes commit.

Backport hint: this patch will have a trivial conflict applying to v6.6.y, and other trivial conflicts applying to stable kernels < v6.6.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/9c3874e559580d6c6ec8d449812ac11277724770/cves/2024/57xxx/CVE-2024-57924.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
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
73697928c806fe4689939722184a86fc1c1957b4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
f47c834a9131ae64bee3c462f4e610c67b0a000f
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
adcde2872f8fc399b249758ae1990dcd53b694ea
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
974e3fe0ac61de85015bbe5a4990cf4127b304b2

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.1.151
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.74
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.10