CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's cachefiles component, where a double unlock occurs in the error handling path of the `nomem_d_alloc` function. This flaw can lead to corruption of the read-write semaphore state, potentially resulting in system instability or denial of service. Linux system administrators and developers should prioritize this issue to ensure the integrity and reliability of their systems.
Original NVD Description
In the Linux kernel, the following vulnerability has been resolved: cachefiles: Fix double unlock in nomem_d_alloc error path When start_creating() fails and returns -ENOMEM, it has already released the parent directory lock in __start_dirop(): static struct dentry *__start_dirop(...) { ... inode_lock_nested(dir, I_MUTEX_PARENT); dentry = lookup_one_qstr_excl(name, parent, lookup_flags); if (IS_ERR(dentry)) inode_unlock(dir); <-- Lock released on error return dentry; } However, the nomem_d_alloc error path in cachefiles_get_directory() unconditionally calls inode_unlock(d_inode(dir)) again, causing a double unlock that corrupts the rwsem state. This is a leftover from commit 7ab96df840e60 which replaced manual locking with start_creating() but failed to update the nomem_d_alloc path (while correctly updating mkdir_error and lookup_error paths).