CVE-2024-47660: fsnotify: clear PARENT_WATCHED flags lazily
In the Linux kernel, the following vulnerability has been resolved:
fsnotify: clear PARENTWATCHED flags lazily
In some setups directories can have many (usually negative) dentries. Hence fsnotifyupdatechilddentryflags() function can take a significant amount of time. Since the bulk of this function happens under inode->ilock this causes a significant contention on the lock when we remove the watch from the directory as the fsnotifyupdatechilddentryflags() call from fsnotifyrecalcmask() races with fsnotifyupdatechilddentryflags() calls from fsnotifyparent() happening on children. This can lead upto softlockup reports reported by users.
Fix the problem by calling fsnotifyupdatechildrendentryflags() to set PARENTWATCHED flags only when parent starts watching children.
When parent stops watching children, clear false positive PARENTWATCHED flags lazily in fsnotifyparent() for each accessed child.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
fsnotify: clear PARENTWATCHED flags lazily
In some setups directories can have many (usually negative) dentries. Hence fsnotifyupdatechilddentryflags() function can take a significant amount of time. Since the bulk of this function happens under inode->ilock this causes a significant contention on the lock when we remove the watch from the directory as the fsnotifyupdatechilddentryflags() call from fsnotifyrecalcmask() races with fsnotifyupdatechilddentryflags() calls from fsnotifyparent() happening on children. This can lead upto softlockup reports reported by users.
Fix the problem by calling fsnotifyupdatechildrendentryflags() to set PARENTWATCHED flags only when parent starts watching children.
When parent stops watching children, clear false positive PARENTWATCHED flags lazily in fsnotifyparent() for each accessed child.
— NVD
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-47660?
CVE-2024-47660 has been assessed to have a high severity due to its potential impact on system performance and stability.
How do I fix CVE-2024-47660?
To mitigate CVE-2024-47660, upgrade your Linux kernel to versions 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.17-1 or apply the specific patches provided for your distribution.
Which versions of the Linux kernel are affected by CVE-2024-47660?
CVE-2024-47660 affects Linux kernel versions up to 5.10.226 and also certain versions ranging from 5.11 to 6.10.9.
What impact does CVE-2024-47660 have on Linux systems?
CVE-2024-47660 can lead to performance degradation in directory handling due to inefficient processing of dentry flags.
Is CVE-2024-47660 a remote exploit vulnerability?
CVE-2024-47660 is not a remote exploit vulnerability; its impact primarily affects local system performance and stability.