In the Linux kernel, the following vulnerability has been resolved:
ntfs: Fix panic about slab-out-of-bounds caused by ntfs_listxattr()
Here is a BUG report from syzbot:
BUG: KASAN: slab-out-of-bounds in ntfslistea fs/ntfs3/xattr.c:191 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x401/0x570 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff888021acaf3d by task syz-executor128/3632
Call Trace: ntfslistea fs/ntfs3/xattr.c:191 [inline] ntfslistxattr+0x401/0x570 fs/ntfs3/xattr.c:710 vfslistxattr fs/xattr.c:457 [inline] listxattr+0x293/0x2d0 fs/xattr.c:804
Fix the logic of eaall iteration. When the ea->namelen is 0, return immediately, or Add2Ptr() would visit invalid memory in the next loop.
[almaz.alexandrovich@paragon-software.com: lines of the patch have changed]
[
{
"signature_type": "Function",
"digest": {
"function_hash": "63026394008101158141136869658855859573",
"length": 677.0
},
"target": {
"file": "fs/ntfs3/xattr.c",
"function": "ntfs_list_ea"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c86a2517df6c9304db8fb12b77136ec7a5d85994",
"id": "CVE-2023-53420-08a71821",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9371918172918950655066203506096471716",
"139944597872368987312844526193687744183",
"80165700238101639244101125847819254880"
]
},
"target": {
"file": "fs/ntfs3/xattr.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c86a2517df6c9304db8fb12b77136ec7a5d85994",
"id": "CVE-2023-53420-1cc6bb6f",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "58808340216748861466911259917646284110",
"length": 701.0
},
"target": {
"file": "fs/ntfs3/xattr.c",
"function": "ntfs_list_ea"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@721b75ea2dfce53a8890dff92ae01afca8e74f88",
"id": "CVE-2023-53420-4514340a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9371918172918950655066203506096471716",
"139944597872368987312844526193687744183",
"80165700238101639244101125847819254880"
]
},
"target": {
"file": "fs/ntfs3/xattr.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3380d895e28a32632eb3609f5bd515adee4e5a1",
"id": "CVE-2023-53420-452e94d4",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"295957394432236842518801702041821445810",
"209502830206565924645091238235068217702",
"11815334653264232191368104048627795508"
]
},
"target": {
"file": "fs/ntfs3/xattr.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c675ddffb17a8b1e32efad5c983254af18b12c2",
"id": "CVE-2023-53420-5a82168f",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"295957394432236842518801702041821445810",
"209502830206565924645091238235068217702",
"11815334653264232191368104048627795508"
]
},
"target": {
"file": "fs/ntfs3/xattr.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@721b75ea2dfce53a8890dff92ae01afca8e74f88",
"id": "CVE-2023-53420-ab48b6ef",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "63026394008101158141136869658855859573",
"length": 677.0
},
"target": {
"file": "fs/ntfs3/xattr.c",
"function": "ntfs_list_ea"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3380d895e28a32632eb3609f5bd515adee4e5a1",
"id": "CVE-2023-53420-b1f05bfb",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "58808340216748861466911259917646284110",
"length": 701.0
},
"target": {
"file": "fs/ntfs3/xattr.c",
"function": "ntfs_list_ea"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c675ddffb17a8b1e32efad5c983254af18b12c2",
"id": "CVE-2023-53420-d0373f41",
"deprecated": false,
"signature_version": "v1"
}
]