CVE-2023-53440
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
18/09/2025
Last modified:
14/01/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
nilfs2: fix sysfs interface lifetime<br />
<br />
The current nilfs2 sysfs support has issues with the timing of creation<br />
and deletion of sysfs entries, potentially leading to null pointer<br />
dereferences, use-after-free, and lockdep warnings.<br />
<br />
Some of the sysfs attributes for nilfs2 per-filesystem instance refer to<br />
metadata file "cpfile", "sufile", or "dat", but<br />
nilfs_sysfs_create_device_group that creates those attributes is executed<br />
before the inodes for these metadata files are loaded, and<br />
nilfs_sysfs_delete_device_group which deletes these sysfs entries is<br />
called after releasing their metadata file inodes.<br />
<br />
Therefore, access to some of these sysfs attributes may occur outside of<br />
the lifetime of these metadata files, resulting in inode NULL pointer<br />
dereferences or use-after-free.<br />
<br />
In addition, the call to nilfs_sysfs_create_device_group() is made during<br />
the locking period of the semaphore "ns_sem" of nilfs object, so the<br />
shrinker call caused by the memory allocation for the sysfs entries, may<br />
derive lock dependencies "ns_sem" -> (shrinker) -> "locks acquired in<br />
nilfs_evict_inode()".<br />
<br />
Since nilfs2 may acquire "ns_sem" deep in the call stack holding other<br />
locks via its error handler __nilfs_error(), this causes lockdep to report<br />
circular locking. This is a false positive and no circular locking<br />
actually occurs as no inodes exist yet when<br />
nilfs_sysfs_create_device_group() is called. Fortunately, the lockdep<br />
warnings can be resolved by simply moving the call to<br />
nilfs_sysfs_create_device_group() out of "ns_sem".<br />
<br />
This fixes these sysfs issues by revising where the device&#39;s sysfs<br />
interface is created/deleted and keeping its lifetime within the lifetime<br />
of the metadata files above.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.17 (including) | 4.14.313 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.281 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.241 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.178 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.107 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.24 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.2.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.3:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.3:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.3:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.3:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.3:rc5:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1942ccb7d95f287a312fcbabfa8bc9ba501b1953
- https://git.kernel.org/stable/c/3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24
- https://git.kernel.org/stable/c/42560f9c92cc43dce75dbf06cc0d840dced39b12
- https://git.kernel.org/stable/c/5fe0ea141fbb887d407f1bf572ebf24427480d5c
- https://git.kernel.org/stable/c/83b16a60e413148685739635901937e2f16a7873
- https://git.kernel.org/stable/c/d20dcec8f326deb77b6688f8441e014045dac457
- https://git.kernel.org/stable/c/d540aea451ab5489777a8156560f1388449b3109
- https://git.kernel.org/stable/c/daf4eb3a908b108279b60172d2f176e70d2df875



