In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Make sure "ib_port" is valid when access sysfs node
The "ibport" structure must be set before adding the sysfs kobject, and reset after removing it, otherwise it may crash when accessing the sysfs node: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000050 Mem abort info: ESR = 0x96000006 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000e85f5ba5 [0000000000000050] pgd=0000000848fd9003, pud=000000085b387003, pmd=0000000000000000 Internal error: Oops: 96000006 [#2] PREEMPT SMP Modules linked in: ibumad(O) mlx5ib(O) nfnetlinkcttimeout(E) nfnetlink(E) actgact(E) clsflower(E) schingress(E) openvswitch(E) nsh(E) nfnatipv6(E) nfnatipv4(E) nfconncount(E) nfnat(E) nfconntrack(E) nfdefragipv6(E) nfdefragipv4(E) mstpciconf(O) ipmidevintf(E) ipmimsghandler(E) ipmbdevint(OE) mlx5core(O) mlxfw(O) mlxdevm(O) auxiliary(O) ibuverbs(O) ibcore(O) mlxcompat(O) psample(E) sbsagwdt(E) uiopdrvgenirq(E) uio(E) mlxbfpmc(OE) mlxbfgige(OE) mlxbftmfifo(OE) gpiomlxbf2(OE) pwrmlxbf(OE) mlxtrio(OE) i2cmlxbf(OE) mlxbootctl(OE) bluefieldedac(OE) knem(O) iptables(E) ipv6(E) crcccitt(E) [last unloaded: mstpci] Process grep (pid: 3372, stack limit = 0x0000000022055c92) CPU: 5 PID: 3372 Comm: grep Tainted: G D OE 4.19.161-mlnx.47.gadcd9e3 #1 Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS BlueField:3.9.2-15-ga2403ab Sep 8 2022 pstate: 40000005 (nZcv daif -PAN -UAO) pc : hwstatportshow+0x4c/0x80 [ibcore] lr : portattrshow+0x40/0x58 [ibcore] sp : ffff000029f43b50 x29: ffff000029f43b50 x28: 0000000019375000 x27: ffff8007b821a540 x26: ffff000029f43e30 x25: 0000000000008000 x24: ffff000000eaa958 x23: 0000000000001000 x22: ffff8007a4ce3000 x21: ffff8007baff8000 x20: ffff8007b9066ac0 x19: ffff8007bae97578 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : ffff8007a4ce4000 x7 : 0000000000000000 x6 : 000000000000003f x5 : ffff000000e6a280 x4 : ffff8007a4ce3000 x3 : 0000000000000000 x2 : aaaaaaaaaaaaaaab x1 : ffff8007b9066a10 x0 : ffff8007baff8000 Call trace: hwstatportshow+0x4c/0x80 [ibcore] portattrshow+0x40/0x58 [ibcore] sysfskfseqshow+0x8c/0x150 kernfsseqshow+0x44/0x50 seqread+0x1b4/0x45c kernfsfopread+0x148/0x1d8 _vfsread+0x58/0x180 vfsread+0x94/0x154 ksysread+0x68/0xd8 _arm64sysread+0x28/0x34 el0svccommon+0x88/0x18c el0svchandler+0x78/0x94 el0svc+0x8/0xe8 Code: f2955562 aa1603e4 aa1503e0 f9405683 (f9402861)
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f981c697b2f9bd5dd2f060e47ff8b5e0a2cd0c06",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-03ffbc76",
"target": {
"function": "destroy_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 515.0,
"function_hash": "142334020288999804535357335045160531404"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e15ff29b156bbbdeadae230c8ecd5ecd8ca2477",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-3cf62a63",
"target": {
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"275431875871483920327606921251729843699",
"135538222826385021200899619486323678614",
"337793433484934264477193095775964560636",
"319371717014979038536691598425998805663",
"202943124795248817771733387317332281328",
"216341854567400518629854797673848300435",
"174822965416304883561182085671585479489",
"89618200996465059454587330318291527032",
"116372996702994694394149188098836428120",
"174922549990681569206122824670337191344",
"39854574315987847836667708845225533139",
"149101666425944863075488997458097324491",
"310094041243794206965342294264803219267",
"39862081584181646832142442821269167042",
"52636969859464475954766440540987963813",
"3260288298983069889495748631191714882",
"257202644899053979748139404454413262486",
"252837969477954420113159484631457907836",
"200396570902061601715073208767693358020",
"243059478918639879526353526536171256064",
"206942603673673471290786016813371733308",
"154196084961923974001717701287700234186",
"222398780278991584797356092590634027605"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f981c697b2f9bd5dd2f060e47ff8b5e0a2cd0c06",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-613bc7f6",
"target": {
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"275431875871483920327606921251729843699",
"135538222826385021200899619486323678614",
"337793433484934264477193095775964560636",
"319371717014979038536691598425998805663",
"202943124795248817771733387317332281328",
"216341854567400518629854797673848300435",
"174822965416304883561182085671585479489",
"89618200996465059454587330318291527032",
"116372996702994694394149188098836428120",
"174922549990681569206122824670337191344",
"39854574315987847836667708845225533139",
"149101666425944863075488997458097324491",
"310094041243794206965342294264803219267",
"39862081584181646832142442821269167042",
"52636969859464475954766440540987963813",
"3260288298983069889495748631191714882",
"257202644899053979748139404454413262486",
"252837969477954420113159484631457907836",
"200396570902061601715073208767693358020",
"243059478918639879526353526536171256064",
"206942603673673471290786016813371733308",
"154196084961923974001717701287700234186",
"222398780278991584797356092590634027605"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd06d32a71fbb198b2d43dddf794badd80ffd25d",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-673b8a83",
"target": {
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"275431875871483920327606921251729843699",
"135538222826385021200899619486323678614",
"337793433484934264477193095775964560636",
"319371717014979038536691598425998805663",
"202943124795248817771733387317332281328",
"216341854567400518629854797673848300435",
"174822965416304883561182085671585479489",
"89618200996465059454587330318291527032",
"116372996702994694394149188098836428120",
"174922549990681569206122824670337191344",
"39854574315987847836667708845225533139",
"149101666425944863075488997458097324491",
"310094041243794206965342294264803219267",
"39862081584181646832142442821269167042",
"52636969859464475954766440540987963813",
"3260288298983069889495748631191714882",
"257202644899053979748139404454413262486",
"252837969477954420113159484631457907836",
"200396570902061601715073208767693358020",
"243059478918639879526353526536171256064",
"206942603673673471290786016813371733308",
"154196084961923974001717701287700234186",
"222398780278991584797356092590634027605"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e15ff29b156bbbdeadae230c8ecd5ecd8ca2477",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-a33e6263",
"target": {
"function": "destroy_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 515.0,
"function_hash": "142334020288999804535357335045160531404"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd06d32a71fbb198b2d43dddf794badd80ffd25d",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-b93642cd",
"target": {
"function": "destroy_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 515.0,
"function_hash": "142334020288999804535357335045160531404"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f981c697b2f9bd5dd2f060e47ff8b5e0a2cd0c06",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-cea2e018",
"target": {
"function": "setup_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 1730.0,
"function_hash": "331023264982769463338194484687150699513"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac7a7d7079124f46180714b2d41a1703d37101bb",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-cfcfe9b4",
"target": {
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"275431875871483920327606921251729843699",
"135538222826385021200899619486323678614",
"337793433484934264477193095775964560636",
"319371717014979038536691598425998805663",
"202943124795248817771733387317332281328",
"216341854567400518629854797673848300435",
"174822965416304883561182085671585479489",
"89618200996465059454587330318291527032",
"116372996702994694394149188098836428120",
"174922549990681569206122824670337191344",
"39854574315987847836667708845225533139",
"149101666425944863075488997458097324491",
"310094041243794206965342294264803219267",
"39862081584181646832142442821269167042",
"52636969859464475954766440540987963813",
"3260288298983069889495748631191714882",
"257202644899053979748139404454413262486",
"252837969477954420113159484631457907836",
"200396570902061601715073208767693358020",
"243059478918639879526353526536171256064",
"206942603673673471290786016813371733308",
"154196084961923974001717701287700234186",
"222398780278991584797356092590634027605"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac7a7d7079124f46180714b2d41a1703d37101bb",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-d3d47300",
"target": {
"function": "destroy_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 515.0,
"function_hash": "142334020288999804535357335045160531404"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac7a7d7079124f46180714b2d41a1703d37101bb",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-d8406e55",
"target": {
"function": "setup_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 1730.0,
"function_hash": "331023264982769463338194484687150699513"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd06d32a71fbb198b2d43dddf794badd80ffd25d",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-e139dc32",
"target": {
"function": "setup_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 1730.0,
"function_hash": "331023264982769463338194484687150699513"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e15ff29b156bbbdeadae230c8ecd5ecd8ca2477",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2022-50475-e4fabb6b",
"target": {
"function": "setup_port",
"file": "drivers/infiniband/core/sysfs.c"
},
"signature_type": "Function",
"digest": {
"length": 1730.0,
"function_hash": "331023264982769463338194484687150699513"
}
}
]