In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix NULL deref in ntfsupdatemftmirr
If ntfsfillsuper() wasn't called then sbi->sb will be equal to NULL. Code should check this ptr before dereferencing. Syzbot hit this issue via passing wrong mount param as can be seen from log below
Fail log: ntfs3: Unknown parameter 'iochvrset' general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 PID: 3589 Comm: syz-executor210 Not tainted 5.18.0-rc3-syzkaller-00016-gb253435746d9 #0 ... Call Trace: <TASK> putntfs+0x1ed/0x2a0 fs/ntfs3/super.c:463 ntfsfsfree+0x6a/0xe0 fs/ntfs3/super.c:1363 putfscontext+0x119/0x7a0 fs/fscontext.c:469 donewmount+0x2b4/0xad0 fs/namespace.c:3044 domount fs/namespace.c:3383 [inline] _dosysmount fs/namespace.c:3591 [inline]
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50057.json"
}[
{
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ntfs_update_mftmirr",
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"function_hash": "213872702014524576102517077565041513900",
"length": 961.0
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bf6089dc01ba3194ab962105d7b85690843c256f",
"id": "CVE-2022-50057-09266e57"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"line_hashes": [
"61400442453944877002587791480162756537",
"144446874121111624030436864726083858666",
"194821605277923211373250463844378329541",
"131616047639076826535269325532929791768",
"222812711767047002884151664810997074763",
"65484024684074093210281146783585470116"
],
"threshold": 0.9
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bf6089dc01ba3194ab962105d7b85690843c256f",
"id": "CVE-2022-50057-33ecdc0a"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ntfs_update_mftmirr",
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"function_hash": "213872702014524576102517077565041513900",
"length": 961.0
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8e8e1a84dac7a3d2b432162a70d7fb6a75960772",
"id": "CVE-2022-50057-3bd16e25"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"line_hashes": [
"61400442453944877002587791480162756537",
"144446874121111624030436864726083858666",
"194821605277923211373250463844378329541",
"131616047639076826535269325532929791768",
"222812711767047002884151664810997074763",
"65484024684074093210281146783585470116"
],
"threshold": 0.9
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8e8e1a84dac7a3d2b432162a70d7fb6a75960772",
"id": "CVE-2022-50057-46f9d7b1"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"line_hashes": [
"61400442453944877002587791480162756537",
"144446874121111624030436864726083858666",
"194821605277923211373250463844378329541",
"131616047639076826535269325532929791768",
"222812711767047002884151664810997074763",
"65484024684074093210281146783585470116"
],
"threshold": 0.9
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@321460ca3b55f48b3ba6008248264ab2bd6407d9",
"id": "CVE-2022-50057-4fe28568"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ntfs_update_mftmirr",
"file": "fs/ntfs3/fsntfs.c"
},
"digest": {
"function_hash": "213872702014524576102517077565041513900",
"length": 961.0
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@321460ca3b55f48b3ba6008248264ab2bd6407d9",
"id": "CVE-2022-50057-8eb65d86"
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50057.json"