CVE-2025-21721

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-21721
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21721.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-21721
Downstream
Related
Published
2025-02-27T02:07:29.784Z
Modified
2025-11-28T02:35:26.997740Z
Summary
nilfs2: handle errors that nilfs_prepare_chunk() may return
Details

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

nilfs2: handle errors that nilfspreparechunk() may return

Patch series "nilfs2: fix issues with rename operations".

This series fixes BUG_ON check failures reported by syzbot around rename operations, and a minor behavioral issue where the mtime of a child directory changes when it is renamed instead of moved.

This patch (of 2):

The directory manipulation routines nilfssetlink() and nilfsdeleteentry() rewrite the directory entry in the folio/page previously read by nilfsfindentry(), so error handling is omitted on the assumption that nilfspreparechunk(), which prepares the buffer for rewriting, will always succeed for these. And if an error is returned, it triggers the legacy BUG_ON() checks in each routine.

This assumption is wrong, as proven by syzbot: the buffer layer called by nilfspreparechunk() may call nilfsgetblock() if necessary, which may fail due to metadata corruption or other reasons. This has been there all along, but improved sanity checks and error handling may have made it more reproducible in fuzzing tests.

Fix this issue by adding missing error paths in nilfssetlink(), nilfsdeleteentry(), and their caller nilfs_rename().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21721.json"
}
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
2ba466d74ed74f073257f86e61519cb8f8f46184
Fixed
b38c6c260c2415c7f0968871305e7a093daabb4c
Fixed
f70bd2d8ca454e0ed78970f72147ca321dbaa015
Fixed
607dc724b162f4452dc768865e578c1a509a1c8c
Fixed
1ee2d454baa361d2964e3e2f2cca9ee3f769d93c
Fixed
7891ac3b0a5c56f7148af507306308ab841cdc31
Fixed
eddd3176b8c4c83a46ab974574cda7c3dfe09388
Fixed
481136234dfe96c7f92770829bec6111c7c5f5dd
Fixed
ee70999a988b8abc3490609142f50ebaa8344432

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.30
Fixed
5.4.291
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.235
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.179
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.131
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.80
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.13
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.2