In the Linux kernel, the following vulnerability has been resolved:
ext4: fix uninititialized value in 'ext4evictinode'
BUG: KMSAN: uninit-value in ext4evictinode+0xdd/0x26b0 fs/ext4/inode.c:180 ext4evictinode+0xdd/0x26b0 fs/ext4/inode.c:180 evict+0x365/0x9a0 fs/inode.c:664 iputfinal fs/inode.c:1747 [inline] iput+0x985/0xdd0 fs/inode.c:1773 _ext4newinode+0xe54/0x7ec0 fs/ext4/ialloc.c:1361 ext4mknod+0x376/0x840 fs/ext4/namei.c:2844 vfsmknod+0x79d/0x830 fs/namei.c:3914 domknodat+0x47d/0xaa0 _dosysmknodat fs/namei.c:3992 [inline] _sesysmknodat fs/namei.c:3989 [inline] _ia32sysmknodat+0xeb/0x150 fs/namei.c:3989 dosyscall32irqson arch/x86/entry/common.c:112 [inline] _dofastsyscall32+0xa2/0x100 arch/x86/entry/common.c:178 dofastsyscall32+0x33/0x70 arch/x86/entry/common.c:203 doSYSENTER32+0x1b/0x20 arch/x86/entry/common.c:246 entrySYSENTERcompatafter_hwframe+0x70/0x82
Uninit was created at: allocpages+0x9f1/0xe80 mm/pagealloc.c:5578 allocpages+0xaae/0xd80 mm/mempolicy.c:2285 allocslabpage mm/slub.c:1794 [inline] allocateslab+0x1b5/0x1010 mm/slub.c:1939 newslab mm/slub.c:1992 [inline] _slaballoc+0x10c3/0x2d60 mm/slub.c:3180 _slaballoc mm/slub.c:3279 [inline] slaballocnode mm/slub.c:3364 [inline] slaballoc mm/slub.c:3406 [inline] _kmemcachealloclru mm/slub.c:3413 [inline] kmemcachealloclru+0x6f3/0xb30 mm/slub.c:3429 allocinodesb include/linux/fs.h:3117 [inline] ext4allocinode+0x5f/0x860 fs/ext4/super.c:1321 allocinode+0x83/0x440 fs/inode.c:259 newinodepseudo fs/inode.c:1018 [inline] newinode+0x3b/0x430 fs/inode.c:1046 _ext4newinode+0x2a7/0x7ec0 fs/ext4/ialloc.c:959 ext4mkdir+0x4d5/0x1560 fs/ext4/namei.c:2992 vfsmkdir+0x62a/0x870 fs/namei.c:4035 domkdirat+0x466/0x7b0 fs/namei.c:4060 _dosysmkdirat fs/namei.c:4075 [inline] _sesysmkdirat fs/namei.c:4073 [inline] _ia32sysmkdirat+0xc4/0x120 fs/namei.c:4073 dosyscall32irqson arch/x86/entry/common.c:112 [inline] _dofastsyscall32+0xa2/0x100 arch/x86/entry/common.c:178 dofastsyscall32+0x33/0x70 arch/x86/entry/common.c:203 doSYSENTER32+0x1b/0x20 arch/x86/entry/common.c:246 entrySYSENTERcompatafterhwframe+0x70/0x82
CPU: 1 PID: 4625 Comm: syz-executor.2 Not tainted 6.1.0-rc4-syzkaller-62821-gcb231e2f67ec #0
Now, 'ext4allocinode()' didn't init 'ei->iflags'. If new inode failed before set 'ei->iflags' in '_ext4newinode()', then do 'iput()'. As after 6bc0d63dad7f commit will access 'ei->iflags' in 'ext4evictinode()' which will lead to access uninit-value. To solve above issue just init 'ei->iflags' in 'ext4alloc_inode()'.
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"177201396537408864454898488221105264295",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"175811605665214789522978019941386315154"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-39538bc1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0bffdcc7cb14598af2aa706f1e0f2a9054154ba"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "290000275720324737610193376651513191492",
"length": 1146.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-41138ae0",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ea71af94eaaaf6d9aed24bc94a05b977a741cb9"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"204726844277087665435857034501893744191",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"14513457880176619836016320772256524050"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-4df43d89",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ea71af94eaaaf6d9aed24bc94a05b977a741cb9"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "290000275720324737610193376651513191492",
"length": 1146.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-5c953035",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f966e021c20caae639dd0e404c8761e8281a2c4"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"177201396537408864454898488221105264295",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"14513457880176619836016320772256524050"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-60e0d6a8",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@091f85db4c3fb1734a6d7fb4777a2b2831da6631"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"204726844277087665435857034501893744191",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"14513457880176619836016320772256524050"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-717e1c6c",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f966e021c20caae639dd0e404c8761e8281a2c4"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"204726844277087665435857034501893744191",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"14513457880176619836016320772256524050"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-8517e245",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@56491d60ddca9c697d885394cb0173675b9ab81f"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "247364116720937734183461309911370780811",
"length": 1065.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-8c8500eb",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0bffdcc7cb14598af2aa706f1e0f2a9054154ba"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "321047826464045698612041508399062125435",
"length": 1138.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-939a41a9",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c31d8d3ad95aef8cc17a4fcf317e46217148439"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"177201396537408864454898488221105264295",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"14513457880176619836016320772256524050"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-bab355bd",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c31d8d3ad95aef8cc17a4fcf317e46217148439"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "321047826464045698612041508399062125435",
"length": 1138.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-d20bb53a",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@091f85db4c3fb1734a6d7fb4777a2b2831da6631"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "290000275720324737610193376651513191492",
"length": 1146.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-e712126b",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@56491d60ddca9c697d885394cb0173675b9ab81f"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"177201396537408864454898488221105264295",
"274213873119526309839694749244369609917",
"27789437871307591882528706308404237399",
"175811605665214789522978019941386315154"
]
},
"target": {
"file": "fs/ext4/super.c"
},
"signature_version": "v1",
"id": "CVE-2022-50546-f194fb3e",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e431b4fb1fb8c2654b808086e9747a000adb9655"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "83218045925037166414018827351148564983",
"length": 1104.0
},
"target": {
"file": "fs/ext4/super.c",
"function": "ext4_alloc_inode"
},
"signature_version": "v1",
"id": "CVE-2022-50546-fe6fd24a",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e431b4fb1fb8c2654b808086e9747a000adb9655"
}
]