CVE-2022-50546
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
07/10/2025
Last modified:
08/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ext4: fix uninititialized value in &#39;ext4_evict_inode&#39;<br />
<br />
Syzbot found the following issue:<br />
=====================================================<br />
BUG: KMSAN: uninit-value in ext4_evict_inode+0xdd/0x26b0 fs/ext4/inode.c:180<br />
ext4_evict_inode+0xdd/0x26b0 fs/ext4/inode.c:180<br />
evict+0x365/0x9a0 fs/inode.c:664<br />
iput_final fs/inode.c:1747 [inline]<br />
iput+0x985/0xdd0 fs/inode.c:1773<br />
__ext4_new_inode+0xe54/0x7ec0 fs/ext4/ialloc.c:1361<br />
ext4_mknod+0x376/0x840 fs/ext4/namei.c:2844<br />
vfs_mknod+0x79d/0x830 fs/namei.c:3914<br />
do_mknodat+0x47d/0xaa0<br />
__do_sys_mknodat fs/namei.c:3992 [inline]<br />
__se_sys_mknodat fs/namei.c:3989 [inline]<br />
__ia32_sys_mknodat+0xeb/0x150 fs/namei.c:3989<br />
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]<br />
__do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178<br />
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203<br />
do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246<br />
entry_SYSENTER_compat_after_hwframe+0x70/0x82<br />
<br />
Uninit was created at:<br />
__alloc_pages+0x9f1/0xe80 mm/page_alloc.c:5578<br />
alloc_pages+0xaae/0xd80 mm/mempolicy.c:2285<br />
alloc_slab_page mm/slub.c:1794 [inline]<br />
allocate_slab+0x1b5/0x1010 mm/slub.c:1939<br />
new_slab mm/slub.c:1992 [inline]<br />
___slab_alloc+0x10c3/0x2d60 mm/slub.c:3180<br />
__slab_alloc mm/slub.c:3279 [inline]<br />
slab_alloc_node mm/slub.c:3364 [inline]<br />
slab_alloc mm/slub.c:3406 [inline]<br />
__kmem_cache_alloc_lru mm/slub.c:3413 [inline]<br />
kmem_cache_alloc_lru+0x6f3/0xb30 mm/slub.c:3429<br />
alloc_inode_sb include/linux/fs.h:3117 [inline]<br />
ext4_alloc_inode+0x5f/0x860 fs/ext4/super.c:1321<br />
alloc_inode+0x83/0x440 fs/inode.c:259<br />
new_inode_pseudo fs/inode.c:1018 [inline]<br />
new_inode+0x3b/0x430 fs/inode.c:1046<br />
__ext4_new_inode+0x2a7/0x7ec0 fs/ext4/ialloc.c:959<br />
ext4_mkdir+0x4d5/0x1560 fs/ext4/namei.c:2992<br />
vfs_mkdir+0x62a/0x870 fs/namei.c:4035<br />
do_mkdirat+0x466/0x7b0 fs/namei.c:4060<br />
__do_sys_mkdirat fs/namei.c:4075 [inline]<br />
__se_sys_mkdirat fs/namei.c:4073 [inline]<br />
__ia32_sys_mkdirat+0xc4/0x120 fs/namei.c:4073<br />
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]<br />
__do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178<br />
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203<br />
do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:246<br />
entry_SYSENTER_compat_after_hwframe+0x70/0x82<br />
<br />
CPU: 1 PID: 4625 Comm: syz-executor.2 Not tainted 6.1.0-rc4-syzkaller-62821-gcb231e2f67ec #0<br />
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022<br />
=====================================================<br />
<br />
Now, &#39;ext4_alloc_inode()&#39; didn&#39;t init &#39;ei->i_flags&#39;. If new inode failed<br />
before set &#39;ei->i_flags&#39; in &#39;__ext4_new_inode()&#39;, then do &#39;iput()&#39;. As after<br />
6bc0d63dad7f commit will access &#39;ei->i_flags&#39; in &#39;ext4_evict_inode()&#39; which<br />
will lead to access uninit-value.<br />
To solve above issue just init &#39;ei->i_flags&#39; in &#39;ext4_alloc_inode()&#39;.
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/091f85db4c3fb1734a6d7fb4777a2b2831da6631
- https://git.kernel.org/stable/c/3c31d8d3ad95aef8cc17a4fcf317e46217148439
- https://git.kernel.org/stable/c/56491d60ddca9c697d885394cb0173675b9ab81f
- https://git.kernel.org/stable/c/7ea71af94eaaaf6d9aed24bc94a05b977a741cb9
- https://git.kernel.org/stable/c/9f966e021c20caae639dd0e404c8761e8281a2c4
- https://git.kernel.org/stable/c/e431b4fb1fb8c2654b808086e9747a000adb9655
- https://git.kernel.org/stable/c/f0bffdcc7cb14598af2aa706f1e0f2a9054154ba



