In the Linux kernel, the following vulnerability has been resolved:
hfs: fix to initialize fields of hfsinodeinfo after hfsallocinode()
Syzbot reports uninitialized value access issue as below:
BUG: KMSAN: uninit-value in hfsrevalidatedentry+0x307/0x3f0 fs/hfs/sysdep.c:30 hfsrevalidatedentry+0x307/0x3f0 fs/hfs/sysdep.c:30 drevalidate fs/namei.c:862 [inline] lookupfast+0x89e/0x8e0 fs/namei.c:1649 walkcomponent fs/namei.c:2001 [inline] linkpathwalk+0x817/0x1480 fs/namei.c:2332 pathlookupat+0xd9/0x6f0 fs/namei.c:2485 filenamelookup+0x22e/0x740 fs/namei.c:2515 userpathatempty+0x8b/0x390 fs/namei.c:2924 userpathat include/linux/namei.h:57 [inline] domount fs/namespace.c:3689 [inline] _dosysmount fs/namespace.c:3898 [inline] _sesysmount+0x66b/0x810 fs/namespace.c:3875 _x64sysmount+0xe4/0x140 fs/namespace.c:3875 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x63/0x6b
BUG: KMSAN: uninit-value in hfsextreadextent fs/hfs/extent.c:196 [inline] BUG: KMSAN: uninit-value in hfsgetblock+0x92d/0x1620 fs/hfs/extent.c:366 hfsextreadextent fs/hfs/extent.c:196 [inline] hfsgetblock+0x92d/0x1620 fs/hfs/extent.c:366 blockreadfullfolio+0x4ff/0x11b0 fs/buffer.c:2271 hfsreadfolio+0x55/0x60 fs/hfs/inode.c:39 filemapreadfolio+0x148/0x4f0 mm/filemap.c:2426 doreadcachefolio+0x7c8/0xd90 mm/filemap.c:3553 doreadcachepage mm/filemap.c:3595 [inline] readcachepage+0xfb/0x2f0 mm/filemap.c:3604 readmappingpage include/linux/pagemap.h:755 [inline] hfsbtreeopen+0x928/0x1ae0 fs/hfs/btree.c:78 hfsmdbget+0x260c/0x3000 fs/hfs/mdb.c:204 hfsfillsuper+0x1fb1/0x2790 fs/hfs/super.c:406 mountbdev+0x628/0x920 fs/super.c:1359 hfsmount+0xcd/0xe0 fs/hfs/super.c:456 legacygettree+0x167/0x2e0 fs/fscontext.c:610 vfsgettree+0xdc/0x5d0 fs/super.c:1489 donewmount+0x7a9/0x16f0 fs/namespace.c:3145 pathmount+0xf98/0x26a0 fs/namespace.c:3475 domount fs/namespace.c:3488 [inline] _dosysmount fs/namespace.c:3697 [inline] _sesysmount+0x919/0x9e0 fs/namespace.c:3674 _ia32sysmount+0x15b/0x1b0 fs/namespace.c:3674 dosyscall32irqson arch/x86/entry/common.c:112 [inline] _dofastsyscall32+0xa2/0x100 arch/x86/entry/common.c:178 dofastsyscall32+0x37/0x80 arch/x86/entry/common.c:203 doSYSENTER32+0x1f/0x30 arch/x86/entry/common.c:246 entrySYSENTERcompatafterhwframe+0x70/0x82
Uninit was created at: allocpages+0x9a6/0xe00 mm/pagealloc.c:4590 _allocpagesnode include/linux/gfp.h:238 [inline] allocpagesnode include/linux/gfp.h:261 [inline] allocslabpage mm/slub.c:2190 [inline] allocateslab mm/slub.c:2354 [inline] newslab+0x2d7/0x1400 mm/slub.c:2407 _slaballoc+0x16b5/0x3970 mm/slub.c:3540 _slaballoc mm/slub.c:3625 [inline] _slaballocnode mm/slub.c:3678 [inline] slaballocnode mm/slub.c:3850 [inline] kmemcachealloclru+0x64d/0xb30 mm/slub.c:3879 allocinodesb include/linux/fs.h:3018 [inline] hfsallocinode+0x5a/0xc0 fs/hfs/super.c:165 allocinode+0x83/0x440 fs/inode.c:260 newinodepseudo fs/inode.c:1005 [inline] newinode+0x38/0x4f0 fs/inode.c:1031 hfsnewinode+0x61/0x1010 fs/hfs/inode.c:186 hfsmkdir+0x54/0x250 fs/hfs/dir.c:228 vfsmkdir+0x49a/0x700 fs/namei.c:4126 domkdirat+0x529/0x810 fs/namei.c:4149 _dosysmkdirat fs/namei.c:4164 [inline] _sesysmkdirat fs/namei.c:4162 [inline] _x64sysmkdirat+0xc8/0x120 fs/namei.c:4162 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xcf/0x1e0 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x63/0x6b
It missed to initialize .tzsecondswest, .cachedstart and .cachedblocks fields in struct hfsinodeinfo after hfsalloc_inode(), fix it.
[
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d3493d6f0dfb1ab5225b62faa77732983f2187a1",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-05e47c34",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "66117331632095492698519328187259565992",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d55aae5c1730d6b70d5d8eaff00113cd34772ea3",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-0d395827",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10f7163bfb5f8b4e0c9c05a939f20b8540e33c65",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-13a4fea2",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "160296490303206185500716866269271540990",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4a52861cd76e79f1a593beb23d096523eb9732c2",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-13fd8370",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "160296490303206185500716866269271540990",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c4e40b9b731220f9464975e49da75496e3865c4",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-1a7da4cd",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "105452429227133203994500102112968448578",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58d83fc160505a7009c39dec64effaac5129b971",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-2f1d6977",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d55aae5c1730d6b70d5d8eaff00113cd34772ea3",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-375326f1",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "160296490303206185500716866269271540990",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10f7163bfb5f8b4e0c9c05a939f20b8540e33c65",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-40197a03",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2042.0,
            "function_hash": "112340335728991462468867762099897112599"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f7316b2b2f11cf0c6de917beee8d3de728be24db",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-4104f10f",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2042.0,
            "function_hash": "112340335728991462468867762099897112599"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26a2ed107929a855155429b11e1293b83e6b2a8b",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-49597cc6",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d3493d6f0dfb1ab5225b62faa77732983f2187a1",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-50e1a007",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 1991.0,
            "function_hash": "182289941412780546646534016978622967385"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26a2ed107929a855155429b11e1293b83e6b2a8b",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-72060a2b",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "66117331632095492698519328187259565992",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c4e40b9b731220f9464975e49da75496e3865c4",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-732c86f0",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2025.0,
            "function_hash": "133284093994743431091806866010910366837"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58d83fc160505a7009c39dec64effaac5129b971",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-841855d8",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "160296490303206185500716866269271540990",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c4e40b9b731220f9464975e49da75496e3865c4",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-8ade9799",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4a52861cd76e79f1a593beb23d096523eb9732c2",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-8b58a58f",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f7316b2b2f11cf0c6de917beee8d3de728be24db",
        "deprecated": false,
        "signature_type": "Line",
        "id": "CVE-2024-42311-a705ffa5",
        "target": {
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "line_hashes": [
                "160296490303206185500716866269271540990",
                "215246924228124736079005843161474563978",
                "331537303609382930015208609469997168129",
                "309229389787926534986347502323789337470",
                "4308110143181707913064131379286246784",
                "35341000248693953721058402228489870030",
                "316048295794548131077045823328898580323",
                "303114858960416549221528382969632738565"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d3493d6f0dfb1ab5225b62faa77732983f2187a1",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-b85b22fb",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58d83fc160505a7009c39dec64effaac5129b971",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-bfca40db",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2042.0,
            "function_hash": "112340335728991462468867762099897112599"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10f7163bfb5f8b4e0c9c05a939f20b8540e33c65",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-c1777d43",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4a52861cd76e79f1a593beb23d096523eb9732c2",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-cc9b8b94",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2042.0,
            "function_hash": "112340335728991462468867762099897112599"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26a2ed107929a855155429b11e1293b83e6b2a8b",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-de7e78e1",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 1991.0,
            "function_hash": "182289941412780546646534016978622967385"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d55aae5c1730d6b70d5d8eaff00113cd34772ea3",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-e53bce80",
        "target": {
            "function": "hfs_new_inode",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 2042.0,
            "function_hash": "112340335728991462468867762099897112599"
        }
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f7316b2b2f11cf0c6de917beee8d3de728be24db",
        "deprecated": false,
        "signature_type": "Function",
        "id": "CVE-2024-42311-f917b9b7",
        "target": {
            "function": "hfs_inode_read_fork",
            "file": "fs/hfs/inode.c"
        },
        "digest": {
            "length": 915.0,
            "function_hash": "278367915014631413414485494189886720368"
        }
    }
]