In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Enhance sanity check while generating attr_list
nicreateattrlist uses WARNON to catch error cases while generating attribute list, which only prints out stack trace and may not be enough. This repalces them with more proper error handling flow.
[ 59.666332] BUG: kernel NULL pointer dereference, address: 000000000000000e [ 59.673268] #PF: supervisor read access in kernel mode [ 59.678354] #PF: errorcode(0x0000) - not-present page [ 59.682831] PGD 8000000005ff1067 P4D 8000000005ff1067 PUD 7dee067 PMD 0 [ 59.688556] Oops: 0000 [#1] PREEMPT SMP KASAN PTI [ 59.692642] CPU: 0 PID: 198 Comm: poc Tainted: G B W 6.2.0-rc1+ #4 [ 59.698868] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 59.708795] RIP: 0010:nicreateattrlist+0x505/0x860 [ 59.713657] Code: 7e 10 e8 5e d0 d0 ff 45 0f b7 76 10 48 8d 7b 16 e8 00 d1 d0 ff 66 44 89 73 16 4d 8d 75 0e 4c 89 f7 e8 3f d0 d0 ff 4c 8d8 [ 59.731559] RSP: 0018:ffff88800a56f1e0 EFLAGS: 00010282 [ 59.735691] RAX: 0000000000000001 RBX: ffff88800b7b5088 RCX: ffffffffb83079fe [ 59.741792] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbb7f9fc0 [ 59.748423] RBP: ffff88800a56f3a8 R08: ffff88800b7b50a0 R09: fffffbfff76ff3f9 [ 59.754654] R10: ffffffffbb7f9fc7 R11: fffffbfff76ff3f8 R12: ffff88800b756180 [ 59.761552] R13: 0000000000000000 R14: 000000000000000e R15: 0000000000000050 [ 59.768323] FS: 00007feaa8c96440(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000 [ 59.776027] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 59.781395] CR2: 00007f3a2e0b1000 CR3: 000000000a5bc000 CR4: 00000000000006f0 [ 59.787607] Call Trace: [ 59.790271] <TASK> [ 59.792488] ? _pfxnicreateattrlist+0x10/0x10 [ 59.797235] ? kerneltextaddress+0xd3/0xe0 [ 59.800856] ? unwindgetreturnaddress+0x3e/0x60 [ 59.805101] ? _kasancheckwrite+0x18/0x20 [ 59.809296] ? preemptcountsub+0x1c/0xd0 [ 59.813421] niinsattrext+0x52c/0x5c0 [ 59.817034] ? _pfxniinsattrext+0x10/0x10 [ 59.821926] ? _vfssetxattr+0x121/0x170 [ 59.825718] ? _vfssetxattrnoperm+0x97/0x300 [ 59.829562] ? _vfssetxattrlocked+0x145/0x170 [ 59.833987] ? vfssetxattr+0x137/0x2a0 [ 59.836732] ? dosetxattr+0xce/0x150 [ 59.839807] ? setxattr+0x126/0x140 [ 59.842353] ? pathsetxattr+0x164/0x180 [ 59.845275] ? _x64syssetxattr+0x71/0x90 [ 59.848838] ? dosyscall64+0x3f/0x90 [ 59.851898] ? entrySYSCALL64afterhwframe+0x72/0xdc [ 59.857046] ? stackdepotsave+0x17/0x20 [ 59.860299] niinsertattr+0x1ba/0x420 [ 59.863104] ? _pfxniinsertattr+0x10/0x10 [ 59.867069] ? preemptcountsub+0x1c/0xd0 [ 59.869897] ? _rawspinunlockirqrestore+0x2b/0x50 [ 59.874088] ? _createobject+0x3ae/0x5d0 [ 59.877865] niinsertresident+0xc4/0x1c0 [ 59.881430] ? _pfxniinsertresident+0x10/0x10 [ 59.886355] ? kasansaveallocinfo+0x1f/0x30 [ 59.891117] ? _kasankmalloc+0x8b/0xa0 [ 59.894383] ntfssetea+0x90d/0xbf0 [ 59.897703] ? _pfxntfssetea+0x10/0x10 [ 59.901011] ? kerneltextaddress+0xd3/0xe0 [ 59.905308] ? _kerneltextaddress+0x16/0x50 [ 59.909811] ? unwindgetreturnaddress+0x3e/0x60 [ 59.914898] ? _pfxstacktraceconsumeentry+0x10/0x10 [ 59.920250] ? archstackwalk+0xa2/0x100 [ 59.924560] ? filterirqstacks+0x27/0x80 [ 59.928722] ntfssetxattr+0x405/0x440 [ 59.932512] ? _pfxntfssetxattr+0x10/0x10 [ 59.936634] ? kvmallocnode+0x2d/0x120 [ 59.940378] ? kasansavestack+0x41/0x60 [ 59.943870] ? kasansavestack+0x2a/0x60 [ 59.947719] ? kasansettrack+0x29/0x40 [ 59.951417] ? kasansaveallocinfo+0x1f/0x30 [ 59.955733] ? _kasankmalloc+0x8b/0xa0 [ 59.959598] ? _kmallocnode+0x68/0x150 [ 59.963163] ? kvmallocnode+0x2d/0x120 [ 59.966490] ? vmemdupuser+0x2b/0xa0 ---truncated---
[
{
"target": {
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64fab8bce5237ca225ee1ec9dff5cc8c31b0631f",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-53328-3f09a206",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318859513743263976998277769951409015917",
"116777196091838979935465932151381348143",
"262881690222611273235579158145007749843",
"239238482223061268103067492114127200939",
"180303785706618350030419247306745818039",
"33990748124734990440785046475509159346",
"254632548914236250472926255498334362464",
"50968414090212008589138991887227040573",
"21083965674179349585166180184584558450",
"257139958242235620792409108662062212011",
"238371521198584943200633226151362739824",
"289005205200301678511724201243949544968",
"304454222495969754577785438492655724170",
"52490281953471685949542749175771979478",
"327577726352834030748823017849606351008",
"131868171746280015004123994205265047724",
"80195362538514373151910711575898042794",
"112707368573019880441949433173736766263",
"191212184563162862916327094424726140825",
"63800598800556920033775244480468188762",
"200005799826641321516229881745165539098",
"25693007210733867773205244122430466404",
"245387135987349332507138520982483068285",
"210262333847670347930161629481271408228",
"1977997702382662866918720259886583115"
]
}
},
{
"target": {
"function": "ni_create_attr_list",
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7799bb4dbe26bfb665f29ea87981708fd6012d8",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-53328-46aa2df3",
"digest": {
"function_hash": "316080028796602900040249324419472773010",
"length": 2748.0
}
},
{
"target": {
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4246bbef0442f4a1e974df0ab091f4f33ac69451",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-53328-8a7f8c98",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318859513743263976998277769951409015917",
"116777196091838979935465932151381348143",
"262881690222611273235579158145007749843",
"239238482223061268103067492114127200939",
"180303785706618350030419247306745818039",
"33990748124734990440785046475509159346",
"254632548914236250472926255498334362464",
"50968414090212008589138991887227040573",
"21083965674179349585166180184584558450",
"257139958242235620792409108662062212011",
"238371521198584943200633226151362739824",
"289005205200301678511724201243949544968",
"304454222495969754577785438492655724170",
"52490281953471685949542749175771979478",
"327577726352834030748823017849606351008",
"131868171746280015004123994205265047724",
"80195362538514373151910711575898042794",
"112707368573019880441949433173736766263",
"191212184563162862916327094424726140825",
"63800598800556920033775244480468188762",
"200005799826641321516229881745165539098",
"25693007210733867773205244122430466404",
"245387135987349332507138520982483068285",
"210262333847670347930161629481271408228",
"1977997702382662866918720259886583115"
]
}
},
{
"target": {
"function": "ni_create_attr_list",
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fdec309c7672cbee4dc0229ee4cbb33c948a1bdd",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-53328-a4610d53",
"digest": {
"function_hash": "316080028796602900040249324419472773010",
"length": 2748.0
}
},
{
"target": {
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7799bb4dbe26bfb665f29ea87981708fd6012d8",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-53328-ac781ebc",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318859513743263976998277769951409015917",
"116777196091838979935465932151381348143",
"262881690222611273235579158145007749843",
"239238482223061268103067492114127200939",
"180303785706618350030419247306745818039",
"33990748124734990440785046475509159346",
"254632548914236250472926255498334362464",
"50968414090212008589138991887227040573",
"21083965674179349585166180184584558450",
"257139958242235620792409108662062212011",
"238371521198584943200633226151362739824",
"289005205200301678511724201243949544968",
"304454222495969754577785438492655724170",
"52490281953471685949542749175771979478",
"327577726352834030748823017849606351008",
"131868171746280015004123994205265047724",
"80195362538514373151910711575898042794",
"112707368573019880441949433173736766263",
"191212184563162862916327094424726140825",
"63800598800556920033775244480468188762",
"200005799826641321516229881745165539098",
"25693007210733867773205244122430466404",
"245387135987349332507138520982483068285",
"210262333847670347930161629481271408228",
"1977997702382662866918720259886583115"
]
}
},
{
"target": {
"function": "ni_create_attr_list",
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4246bbef0442f4a1e974df0ab091f4f33ac69451",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-53328-e3bd82b3",
"digest": {
"function_hash": "316080028796602900040249324419472773010",
"length": 2748.0
}
},
{
"target": {
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fdec309c7672cbee4dc0229ee4cbb33c948a1bdd",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-53328-f924507a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318859513743263976998277769951409015917",
"116777196091838979935465932151381348143",
"262881690222611273235579158145007749843",
"239238482223061268103067492114127200939",
"180303785706618350030419247306745818039",
"33990748124734990440785046475509159346",
"254632548914236250472926255498334362464",
"50968414090212008589138991887227040573",
"21083965674179349585166180184584558450",
"257139958242235620792409108662062212011",
"238371521198584943200633226151362739824",
"289005205200301678511724201243949544968",
"304454222495969754577785438492655724170",
"52490281953471685949542749175771979478",
"327577726352834030748823017849606351008",
"131868171746280015004123994205265047724",
"80195362538514373151910711575898042794",
"112707368573019880441949433173736766263",
"191212184563162862916327094424726140825",
"63800598800556920033775244480468188762",
"200005799826641321516229881745165539098",
"25693007210733867773205244122430466404",
"245387135987349332507138520982483068285",
"210262333847670347930161629481271408228",
"1977997702382662866918720259886583115"
]
}
},
{
"target": {
"function": "ni_create_attr_list",
"file": "fs/ntfs3/frecord.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64fab8bce5237ca225ee1ec9dff5cc8c31b0631f",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-53328-fb1fb2d7",
"digest": {
"function_hash": "316080028796602900040249324419472773010",
"length": 2748.0
}
}
]