{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2021-47542",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-05-24T15:02:54.829Z",
        "datePublished": "2024-05-24T15:09:48.578Z",
        "dateUpdated": "2024-08-04T05:39:59.608Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2024-05-29T05:09:45.994Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()\n\nIn qlcnic_83xx_add_rings(), the indirect function of\nahw->hw_ops->alloc_mbx_args will be called to allocate memory for\ncmd.req.arg, and there is a dereference of it in qlcnic_83xx_add_rings(),\nwhich could lead to a NULL pointer dereference on failure of the\nindirect function like qlcnic_83xx_alloc_mbx_args().\n\nFix this bug by adding a check of alloc_mbx_args(), this patch\nimitates the logic of mbx_cmd()'s failure handling.\n\nThis bug was found by a static analyzer. The analysis employs\ndifferential checking to identify inconsistent security operations\n(e.g., checks or kfrees) between two code paths and confirms that the\ninconsistent operations are not recovered in the current function or\nthe callers, so they constitute bugs.\n\nNote that, as a bug found by static analysis, it can be a false\npositive or hard to trigger. Multiple researchers have cross-reviewed\nthe bug.\n\nBuilds with CONFIG_QLCNIC=m show no new warnings, and our\nstatic analyzer no longer warns about this code."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c"
                    ],
                    "versions": [
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "3a061d54e260",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "b4f217d6fcc0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "550658a2d61e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "57af54a56024",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "bbeb0325a746",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "15fa12c119f8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "c5ef33c1489b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "7f9664525f9c",
                            "lessThan": "e2dabc4f7e7b",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c"
                    ],
                    "versions": [
                        {
                            "version": "3.9",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.9",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.4.294",
                            "lessThanOrEqual": "4.4.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.9.292",
                            "lessThanOrEqual": "4.9.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.14.257",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.19.220",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.4.164",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.10.84",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.15.7",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073"
                },
                {
                    "url": "https://git.kernel.org/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45"
                },
                {
                    "url": "https://git.kernel.org/stable/c/57af54a56024435d83e44c78449513b414eb6edf"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572"
                }
            ],
            "title": "net: qlogic: qlcnic: Fix a NULL pointer dereference in qlcnic_83xx_add_rings()",
            "x_generator": {
                "engine": "bippy-a5840b7849dd"
            }
        },
        "adp": [
            {
                "title": "CISA ADP Vulnrichment",
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2021-47542",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-05-24T17:04:13.533892Z"
                            }
                        }
                    }
                ],
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-06-04T17:14:29.864Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-04T05:39:59.608Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/3a061d54e260b701b538873b43e399d9b8b83e03",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/b4f217d6fcc00c3fdc0921a7691f30be7490b073",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/550658a2d61e4eaf522c8ebc7fad76dc376bfb45",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/57af54a56024435d83e44c78449513b414eb6edf",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/bbeb0325a7460ebf1e03f5e0bfc5c652fba9519f",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/15fa12c119f869173f9b710cbe6a4a14071d2105",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/c5ef33c1489b2cd74368057fa00b5d2183bb5853",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/e2dabc4f7e7b60299c20a36d6a7b24ed9bf8e572",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}