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