CVE-2023-53440
Last modified
CVE-2023-53440 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix sysfs interface lifetime The current nilfs2 sysfs support has issues with the timing of creation and deletion of sysfs entries, potentially leading to null pointer dereferences, use-after-free, and lockdep warnings. Some of the sysfs attributes for nilfs2 per-filesystem instance refer to metadata file "cpfile", "sufile", or "dat", but nilfs_sysfs_create_device_group that creates those attributes is executed before the inodes for these metadata files are loaded, and nilfs_sysfs_delete_device_group which deletes these sysfs entries is called after releasing their metadata file inodes. Therefore, access to some of these sysfs attributes may occur outside of the lifetime of these metadata files, resulting in inode NULL pointer dereferences or use-after-free. In addition, the call to nilfs_sysfs_create_device_group() is made during the locking period of the semaphore "ns_sem" of nilfs object, so the shrinker call caused by the memory allocation for the sysfs entries, may derive lock dependencies "ns_sem" -> (shrinker) -> "locks acquired in nilfs_evict_inode()". Since nilfs2 may acquire "ns_sem" deep in the call stack holding other locks via its error handler __nilfs_error(), this causes lockdep to report circular locking. This is a false positive and no circular locking actually occurs as no inodes exist yet when nilfs_sysfs_create_device_group() is called. EPSS estimates a 0.13% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix sysfs interface lifetime The current nilfs2 sysfs support has issues with the timing of creation and deletion of sysfs entries, potentially leading to null pointer dereferences, use-after-free, and lockdep warnings. Some of the sysfs attributes for nilfs2 per-filesystem instance refer to metadata file "cpfile", "sufile", or "dat", but nilfs_sysfs_create_device_group that creates those attributes is executed before the inodes for these metadata files are loaded, and nilfs_sysfs_delete_device_group which deletes these sysfs entries is called after releasing their metadata file inodes. Therefore, access to some of these sysfs attributes may occur outside of the lifetime of these metadata files, resulting in inode NULL pointer dereferences or use-after-free. In addition, the call to nilfs_sysfs_create_device_group() is made during the locking period of the semaphore "ns_sem" of nilfs object, so the shrinker call caused by the memory allocation for the sysfs entries, may derive lock dependencies "ns_sem" -> (shrinker) -> "locks acquired in nilfs_evict_inode()". Since nilfs2 may acquire "ns_sem" deep in the call stack holding other locks via its error handler __nilfs_error(), this causes lockdep to report circular locking. This is a false positive and no circular locking actually occurs as no inodes exist yet when nilfs_sysfs_create_device_group() is called. Fortunately, the lockdep warnings can be resolved by simply moving the call to nilfs_sysfs_create_device_group() out of "ns_sem". This fixes these sysfs issues by revising where the device's sysfs interface is created/deleted and keeping its lifetime within the lifetime of the metadata files above.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 3.17, < 4.14.313 | — |
| Linux | Linux Kernel | >= 4.15, < 4.19.281 | — |
| Linux | Linux Kernel | >= 4.20, < 5.4.241 | — |
| Linux | Linux Kernel | >= 5.5, < 5.10.178 | — |
| Linux | Linux Kernel | >= 5.11, < 5.15.107 | — |
| Linux | Linux Kernel | >= 5.16, < 6.1.24 | — |
| Linux | Linux Kernel | >= 6.2, < 6.2.11 | — |
| Linux | Linux Kernel | 6.3 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2023-53440?
How severe is CVE-2023-53440?
How do I fix CVE-2023-53440?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-53435In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53436In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53437In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53438In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53439In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-5344Heap-based Buffer Overflow in GitHub repository vim/vim prio…7.5
- CVE-2023-53441In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53442In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53443In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53444In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53445In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2023-53446In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2023-53440?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
