# CVE-2026-72368: cachefiles: Fix double unlock in nomem_d_alloc error path

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-08-15T05:56:05.329Z
- Modified: 2026-08-17T06:18:41.010Z
- Assigned by: Linux

## 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).

(As written by CVE List.)

## Affected

- Linux Linux: from 7ab96df840e60eb933abfe65fc5fe44e72f16dc0 before 26757dac15175f2a42e3537f1ba86e62456d48f1; from 7ab96df840e60eb933abfe65fc5fe44e72f16dc0 before 8c256fba2b46020004201c500b2a1fbc707a33ef; 6.19 (not affected: before 6.19; from 7.1.5 up to 7.1.*; from 7.2 up to *)

## References

- <https://git.kernel.org/stable/c/26757dac15175f2a42e3537f1ba86e62456d48f1>
- <https://git.kernel.org/stable/c/8c256fba2b46020004201c500b2a1fbc707a33ef>

## Sources

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

---

Page: https://cve.day/CVE-2026-72368 · Whole record: https://cve.day/CVE-2026-72368.json · Rebuilt by cve.day 2026-11-25T22:59:33.097Z
