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.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49208.json"
}[
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49208-02379374",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"312183664149305744295702572348978456998",
"277867394035912236406061764939548690090",
"67352620621952334718957598651153460074",
"294506686131773990758886698772964610358",
"26850215708563176874829403256458812883",
"301610697853522993315675656315689192448",
"90392316572737949290149280336065660455",
"3276071276224730992554875855658256768",
"131758260831881772771325842180225353578",
"43812027486674401943969982354320232570",
"271801660601208057582671007606156172699",
"119645297191842641366878364216011016772",
"239337219602650702658348726744434681185",
"84298206802536284168153342314072371765",
"38946246227341661960829622506346970731",
"196627733510756549199279042157110445508",
"239337219602650702658348726744434681185",
"84298206802536284168153342314072371765"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4"
},
{
"signature_type": "Line",
"deprecated": false,
"id": "CVE-2022-49208-12e4ef5c",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"312183664149305744295702572348978456998",
"277867394035912236406061764939548690090",
"67352620621952334718957598651153460074",
"294506686131773990758886698772964610358",
"26850215708563176874829403256458812883",
"301610697853522993315675656315689192448",
"90392316572737949290149280336065660455",
"3276071276224730992554875855658256768",
"131758260831881772771325842180225353578",
"43812027486674401943969982354320232570",
"271801660601208057582671007606156172699",
"119645297191842641366878364216011016772",
"239337219602650702658348726744434681185",
"84298206802536284168153342314072371765",
"38946246227341661960829622506346970731",
"196627733510756549199279042157110445508",
"239337219602650702658348726744434681185",
"84298206802536284168153342314072371765"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-5eb1b2ee",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_cq_create"
},
"digest": {
"length": 2207.0,
"function_hash": "309942966361966946834634238569418876317"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-63c7ba97",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_ceq_init"
},
"digest": {
"length": 1437.0,
"function_hash": "144718010943911152840938966908368126308"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-9325ad5f",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_ceq_init"
},
"digest": {
"length": 1437.0,
"function_hash": "144718010943911152840938966908368126308"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-97f0ba2d",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_cq_create"
},
"digest": {
"length": 2207.0,
"function_hash": "309942966361966946834634238569418876317"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-ad80d326",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_ccq_init"
},
"digest": {
"length": 1648.0,
"function_hash": "45868288373708681121815466596790977739"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-b03d1fe9",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_qp_create"
},
"digest": {
"length": 1458.0,
"function_hash": "268549727064492031313405668748174211748"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-bfbcd6c1",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_qp_create"
},
"digest": {
"length": 1458.0,
"function_hash": "268549727064492031313405668748174211748"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f21056f15bbeacab7b4b87af232f5599d1f2bff1"
},
{
"signature_type": "Function",
"deprecated": false,
"id": "CVE-2022-49208-ca0f4b93",
"target": {
"file": "drivers/infiniband/hw/irdma/ctrl.c",
"function": "irdma_sc_ccq_init"
},
"digest": {
"length": 1648.0,
"function_hash": "45868288373708681121815466596790977739"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d52dab6e03550f9c97121b0c11c0a3ed78ee76a4"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49208.json"