CVE-2022-50475

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50475
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50475.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50475
Downstream
Published
2025-10-04T15:16:36Z
Modified
2025-10-21T13:20:37.796193Z
Summary
RDMA/core: Make sure "ib_port" is valid when access sysfs node
Details

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)

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d8a5883814b9f7c08d7ff291070687d925b4f859
Fixed
f981c697b2f9bd5dd2f060e47ff8b5e0a2cd0c06
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d8a5883814b9f7c08d7ff291070687d925b4f859
Fixed
ac7a7d7079124f46180714b2d41a1703d37101bb
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d8a5883814b9f7c08d7ff291070687d925b4f859
Fixed
cd06d32a71fbb198b2d43dddf794badd80ffd25d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d8a5883814b9f7c08d7ff291070687d925b4f859
Fixed
5e15ff29b156bbbdeadae230c8ecd5ecd8ca2477

Affected versions

v5.*

v5.13
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.11
v5.15.12
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
v5.15.58
v5.15.59
v5.15.6
v5.15.60
v5.15.61
v5.15.62
v5.15.63
v5.15.64
v5.15.65
v5.15.66
v5.15.67
v5.15.68
v5.15.69
v5.15.7
v5.15.70
v5.15.71
v5.15.72
v5.15.73
v5.15.74
v5.15.75
v5.15.76
v5.15.77
v5.15.78
v5.15.79
v5.15.8
v5.15.80
v5.15.81
v5.15.82
v5.15.83
v5.15.84
v5.15.85
v5.15.9
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.10
v6.0.11
v6.0.12
v6.0.13
v6.0.14
v6.0.15
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1

Database specific

vanir_signatures

[
    {
        "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"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.14.0
Fixed
5.15.86
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.0.16
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.2