{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2021-47541",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-05-24T15:02:54.829Z",
        "datePublished": "2024-05-24T15:09:47.916Z",
        "dateUpdated": "2024-08-04T05:39:59.831Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2024-05-29T05:09:44.959Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx4_en: Fix an use-after-free bug in mlx4_en_try_alloc_resources()\n\nIn mlx4_en_try_alloc_resources(), mlx4_en_copy_priv() is called and\ntmp->tx_cq will be freed on the error path of mlx4_en_copy_priv().\nAfter that mlx4_en_alloc_resources() is called and there is a dereference\nof &tmp->tx_cq[t][i] in mlx4_en_alloc_resources(), which could lead to\na use after free problem on failure of mlx4_en_copy_priv().\n\nFix this bug by adding a check of mlx4_en_copy_priv()\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_MLX4_EN=m show no new warnings,\nand our static 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/mellanox/mlx4/en_netdev.c"
                    ],
                    "versions": [
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "be12572c5ddc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "676dc7d9b15b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "e461a9816a1a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "f1d43efa59f1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "75917372eef0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ec25bc04ed8e",
                            "lessThan": "addad7643142",
                            "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/mellanox/mlx4/en_netdev.c"
                    ],
                    "versions": [
                        {
                            "version": "4.7",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.7",
                            "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/be12572c5ddc8ad7453bada4eec8fa46967dc757"
                },
                {
                    "url": "https://git.kernel.org/stable/c/676dc7d9b15bf8733233a2db1ec3f9091ab34275"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e461a9816a1ac5b4aeb61621b817225b61e46a68"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f1d43efa59f1edd3e7eca0e94559b4c6b1cd4e2b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/75917372eef0dbfb290ae45474314d35f97aea18"
                },
                {
                    "url": "https://git.kernel.org/stable/c/addad7643142f500080417dd7272f49b7a185570"
                }
            ],
            "title": "net/mlx4_en: Fix an use-after-free bug in mlx4_en_try_alloc_resources()",
            "x_generator": {
                "engine": "bippy-a5840b7849dd"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-06-10T18:52:32.131525Z",
                                "id": "CVE-2021-47541",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-06-10T18:52:41.480Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-04T05:39:59.831Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/be12572c5ddc8ad7453bada4eec8fa46967dc757",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/676dc7d9b15bf8733233a2db1ec3f9091ab34275",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/e461a9816a1ac5b4aeb61621b817225b61e46a68",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/f1d43efa59f1edd3e7eca0e94559b4c6b1cd4e2b",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/75917372eef0dbfb290ae45474314d35f97aea18",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/addad7643142f500080417dd7272f49b7a185570",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}