CVE-2022-49208

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49208
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49208.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49208
Downstream
Related
Published
2025-02-26T01:55:46Z
Modified
2025-10-21T09:30:38.710562Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
RDMA/irdma: Prevent some integer underflows
Details

In the Linux kernel, the following vulnerability has been resolved:

RDMA/irdma: Prevent some integer underflows

My static checker complains that:

drivers/infiniband/hw/irdma/ctrl.c:3605 irdma_sc_ceq_init()
warn: can subtract underflow 'info->dev->hmc_fpm_misc.max_ceqs'?

It appears that "info->dev->hmcfpmmisc.maxceqs" comes from the firmware in irdmascparsefpmquerybuf() so, yes, there is a chance that it could be zero. Even if we trust the firmware, it's easy enough to change the condition just as a hardenning measure.

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
3f49d684256963d3f27dfb9d9ff228e2255be78d
Fixed
d52dab6e03550f9c97121b0c11c0a3ed78ee76a4
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3f49d684256963d3f27dfb9d9ff228e2255be78d
Fixed
f21056f15bbeacab7b4b87af232f5599d1f2bff1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3f49d684256963d3f27dfb9d9ff228e2255be78d
Fixed
7340c3675d7ac946f4019b84cd7c64ed542dfe4c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3f49d684256963d3f27dfb9d9ff228e2255be78d
Fixed
6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75

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.4
v5.15.5
v5.15.6
v5.15.7
v5.15.8
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.16.1
v5.16.10
v5.16.11
v5.16.12
v5.16.13
v5.16.14
v5.16.15
v5.16.16
v5.16.17
v5.16.18
v5.16.2
v5.16.3
v5.16.4
v5.16.5
v5.16.6
v5.16.7
v5.16.8
v5.16.9
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.17.1

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4",
        "target": {
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-02379374",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312183664149305744295702572348978456998",
                "277867394035912236406061764939548690090",
                "67352620621952334718957598651153460074",
                "294506686131773990758886698772964610358",
                "26850215708563176874829403256458812883",
                "301610697853522993315675656315689192448",
                "90392316572737949290149280336065660455",
                "3276071276224730992554875855658256768",
                "131758260831881772771325842180225353578",
                "43812027486674401943969982354320232570",
                "271801660601208057582671007606156172699",
                "119645297191842641366878364216011016772",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765",
                "38946246227341661960829622506346970731",
                "196627733510756549199279042157110445508",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75",
        "target": {
            "function": "irdma_sc_ccq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-0f993231",
        "signature_type": "Function",
        "digest": {
            "length": 1598.0,
            "function_hash": "194309844250385815090713687203697587010"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75",
        "target": {
            "function": "irdma_sc_qp_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-1266fe0d",
        "signature_type": "Function",
        "digest": {
            "length": 1432.0,
            "function_hash": "48010846872029887051825073468159719370"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-12e4ef5c",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312183664149305744295702572348978456998",
                "277867394035912236406061764939548690090",
                "67352620621952334718957598651153460074",
                "294506686131773990758886698772964610358",
                "26850215708563176874829403256458812883",
                "301610697853522993315675656315689192448",
                "90392316572737949290149280336065660455",
                "3276071276224730992554875855658256768",
                "131758260831881772771325842180225353578",
                "43812027486674401943969982354320232570",
                "271801660601208057582671007606156172699",
                "119645297191842641366878364216011016772",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765",
                "38946246227341661960829622506346970731",
                "196627733510756549199279042157110445508",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75",
        "target": {
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-1b2fd091",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312183664149305744295702572348978456998",
                "51629648612723355929533693117457000158",
                "143554882588130768625054663794410743384",
                "336304698058697305179618007062206891453",
                "74098719325185304048351041530884092019",
                "154926110267690001004775971750615035734",
                "76710087785041816141020265602069497952",
                "122208961106827380644233749256667886110",
                "316344147657320495632620258435490079442",
                "262429282384650925857855504804467032098",
                "193594045140939915785242293390012452436",
                "303093485685141852893994450591301042058",
                "85366294309421207809391795905507592734",
                "324569939778894413633319491830909086365",
                "259876165520971693915002754588381397400",
                "201005983221381923884421059652767273081",
                "85366294309421207809391795905507592734",
                "324569939778894413633319491830909086365"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7340c3675d7ac946f4019b84cd7c64ed542dfe4c",
        "target": {
            "function": "irdma_sc_ccq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-3dfa1cc5",
        "signature_type": "Function",
        "digest": {
            "length": 1648.0,
            "function_hash": "45868288373708681121815466596790977739"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7340c3675d7ac946f4019b84cd7c64ed542dfe4c",
        "target": {
            "function": "irdma_sc_cq_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-412fdf99",
        "signature_type": "Function",
        "digest": {
            "length": 2207.0,
            "function_hash": "309942966361966946834634238569418876317"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1",
        "target": {
            "function": "irdma_sc_cq_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-5eb1b2ee",
        "signature_type": "Function",
        "digest": {
            "length": 2207.0,
            "function_hash": "309942966361966946834634238569418876317"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4",
        "target": {
            "function": "irdma_sc_ceq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-63c7ba97",
        "signature_type": "Function",
        "digest": {
            "length": 1437.0,
            "function_hash": "144718010943911152840938966908368126308"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7340c3675d7ac946f4019b84cd7c64ed542dfe4c",
        "target": {
            "function": "irdma_sc_qp_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-7cd31bfb",
        "signature_type": "Function",
        "digest": {
            "length": 1458.0,
            "function_hash": "268549727064492031313405668748174211748"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75",
        "target": {
            "function": "irdma_sc_ceq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-7fedeb91",
        "signature_type": "Function",
        "digest": {
            "length": 1387.0,
            "function_hash": "322525075526731604652382682241573996212"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1",
        "target": {
            "function": "irdma_sc_ceq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-9325ad5f",
        "signature_type": "Function",
        "digest": {
            "length": 1437.0,
            "function_hash": "144718010943911152840938966908368126308"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4",
        "target": {
            "function": "irdma_sc_cq_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-97f0ba2d",
        "signature_type": "Function",
        "digest": {
            "length": 2207.0,
            "function_hash": "309942966361966946834634238569418876317"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1",
        "target": {
            "function": "irdma_sc_ccq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-ad80d326",
        "signature_type": "Function",
        "digest": {
            "length": 1648.0,
            "function_hash": "45868288373708681121815466596790977739"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4",
        "target": {
            "function": "irdma_sc_qp_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-b03d1fe9",
        "signature_type": "Function",
        "digest": {
            "length": 1458.0,
            "function_hash": "268549727064492031313405668748174211748"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1",
        "target": {
            "function": "irdma_sc_qp_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-bfbcd6c1",
        "signature_type": "Function",
        "digest": {
            "length": 1458.0,
            "function_hash": "268549727064492031313405668748174211748"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4",
        "target": {
            "function": "irdma_sc_ccq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-ca0f4b93",
        "signature_type": "Function",
        "digest": {
            "length": 1648.0,
            "function_hash": "45868288373708681121815466596790977739"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6f6dbb819dfc1a35bcb8b709b5c83a3ea8beff75",
        "target": {
            "function": "irdma_sc_cq_create",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-d80c3f09",
        "signature_type": "Function",
        "digest": {
            "length": 2165.0,
            "function_hash": "148020111130531418352496110608711012889"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7340c3675d7ac946f4019b84cd7c64ed542dfe4c",
        "target": {
            "function": "irdma_sc_ceq_init",
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-de101b36",
        "signature_type": "Function",
        "digest": {
            "length": 1437.0,
            "function_hash": "144718010943911152840938966908368126308"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7340c3675d7ac946f4019b84cd7c64ed542dfe4c",
        "target": {
            "file": "drivers/infiniband/hw/irdma/ctrl.c"
        },
        "deprecated": false,
        "signature_version": "v1",
        "id": "CVE-2022-49208-e5ee7f05",
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "312183664149305744295702572348978456998",
                "277867394035912236406061764939548690090",
                "67352620621952334718957598651153460074",
                "294506686131773990758886698772964610358",
                "26850215708563176874829403256458812883",
                "301610697853522993315675656315689192448",
                "90392316572737949290149280336065660455",
                "3276071276224730992554875855658256768",
                "131758260831881772771325842180225353578",
                "43812027486674401943969982354320232570",
                "271801660601208057582671007606156172699",
                "119645297191842641366878364216011016772",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765",
                "38946246227341661960829622506346970731",
                "196627733510756549199279042157110445508",
                "239337219602650702658348726744434681185",
                "84298206802536284168153342314072371765"
            ]
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.14.0
Fixed
5.15.33
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.16.19
Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
5.17.2