CVE-2025-71072: shmem: fix recovery on rename failures
In the Linux kernel, the following vulnerability has been resolved:
shmem: fix recovery on rename failures
mapletree insertions can fail if we are seriously short on memory; simpleoffsetrename() does not recover well if it runs into that. The same goes for simpleoffsetrenameexchange().
Moreover, shmemwhiteout() expects that if it succeeds, the caller will progress to dmove(), i.e. that shmemrename2() won't fail past the successful call of shmemwhiteout().
Not hard to fix, fortunately - mtreestore() can't fail if the index we are trying to store into is already present in the tree as a singleton.
For simpleoffsetrenameexchange() that's enough - we just need to be careful about the order of operations.
For simpleoffsetrename() solution is to preinsert the target into the tree for newdir; the rest can be done without any potentially failing operations.
That preinsertion has to be done in shmemrename2() rather than in simpleoffsetrename() itself - otherwise we'd need to deal with the possibility of failure after successful shmemwhiteout().
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71072?
CVE-2025-71072 is categorized as a moderate severity vulnerability affecting the Linux kernel.
How do I fix CVE-2025-71072?
To resolve CVE-2025-71072, upgrade to the patched version of the Linux kernel where the vulnerability has been addressed.
What type of issues does CVE-2025-71072 cause?
CVE-2025-71072 can lead to an unreliable system state during memory shortages when operations on shared memory are attempted.
Which versions of the Linux kernel are affected by CVE-2025-71072?
CVE-2025-71072 affects various versions of the Linux kernel, specifically those that do not include the patches for this vulnerability.
Is CVE-2025-71072 a remote code execution vulnerability?
CVE-2025-71072 is not classified as a remote code execution vulnerability but rather impacts stability and recovery in specific memory conditions.