cve-2023-52851
Vulnerability from cvelistv5
Published
2024-05-21 15:31
Modified
2024-12-19 08:27
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: IB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF In the unlikely event that workqueue allocation fails and returns NULL in mlx5_mkey_cache_init(), delete the call to mlx5r_umr_resource_cleanup() (which frees the QP) in mlx5_ib_stage_post_ib_reg_umr_init(). This will avoid attempted double free of the same QP when __mlx5_ib_add() does its cleanup. Resolves a splat: Syzkaller reported a UAF in ib_destroy_qp_user workqueue: Failed to create a rescuer kthread for wq "mkey_cache": -EINTR infiniband mlx5_0: mlx5_mkey_cache_init:981:(pid 1642): failed to create work queue infiniband mlx5_0: mlx5_ib_stage_post_ib_reg_umr_init:4075:(pid 1642): mr cache init failed -12 ================================================================== BUG: KASAN: slab-use-after-free in ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073) Read of size 8 at addr ffff88810da310a8 by task repro_upstream/1642 Call Trace: <TASK> kasan_report (mm/kasan/report.c:590) ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073) mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198) __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4178) mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402) ... </TASK> Allocated by task 1642: __kmalloc (./include/linux/kasan.h:198 mm/slab_common.c:1026 mm/slab_common.c:1039) create_qp (./include/linux/slab.h:603 ./include/linux/slab.h:720 ./include/rdma/ib_verbs.h:2795 drivers/infiniband/core/verbs.c:1209) ib_create_qp_kernel (drivers/infiniband/core/verbs.c:1347) mlx5r_umr_resource_init (drivers/infiniband/hw/mlx5/umr.c:164) mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4070) __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168) mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402) ... Freed by task 1642: __kmem_cache_free (mm/slub.c:1826 mm/slub.c:3809 mm/slub.c:3822) ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2112) mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198) mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4076 drivers/infiniband/hw/mlx5/main.c:4065) __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168) mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402) ...
Impacted products
Vendor Product Version
Linux Linux Version: 04876c12c19e94bbbc94bb0446c7bc7cd75163de
Version: 04876c12c19e94bbbc94bb0446c7bc7cd75163de
Version: 04876c12c19e94bbbc94bb0446c7bc7cd75163de
Version: 04876c12c19e94bbbc94bb0446c7bc7cd75163de
Create a notification for this product.
   Linux Linux Version: 5.19
Create a notification for this product.
Show details on NVD website


{
   containers: {
      adp: [
         {
            metrics: [
               {
                  other: {
                     content: {
                        id: "CVE-2023-52851",
                        options: [
                           {
                              Exploitation: "none",
                           },
                           {
                              Automatable: "no",
                           },
                           {
                              "Technical Impact": "partial",
                           },
                        ],
                        role: "CISA Coordinator",
                        timestamp: "2024-05-22T18:56:10.534699Z",
                        version: "2.0.3",
                     },
                     type: "ssvc",
                  },
               },
            ],
            providerMetadata: {
               dateUpdated: "2024-06-04T17:22:32.402Z",
               orgId: "134c704f-9b21-4f2e-91b3-4a467353bcc0",
               shortName: "CISA-ADP",
            },
            title: "CISA ADP Vulnrichment",
         },
         {
            providerMetadata: {
               dateUpdated: "2024-08-02T23:11:36.176Z",
               orgId: "af854a3a-2127-422b-91ae-364da2661108",
               shortName: "CVE",
            },
            references: [
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2",
               },
               {
                  tags: [
                     "x_transferred",
                  ],
                  url: "https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836",
               },
            ],
            title: "CVE Program Container",
         },
      ],
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "drivers/infiniband/hw/mlx5/main.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "437f033e30c897bb3723eac9e9003cd9f88d00a3",
                     status: "affected",
                     version: "04876c12c19e94bbbc94bb0446c7bc7cd75163de",
                     versionType: "git",
                  },
                  {
                     lessThan: "4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9",
                     status: "affected",
                     version: "04876c12c19e94bbbc94bb0446c7bc7cd75163de",
                     versionType: "git",
                  },
                  {
                     lessThan: "6387f269d84e6e149499408c4d1fc805017729b2",
                     status: "affected",
                     version: "04876c12c19e94bbbc94bb0446c7bc7cd75163de",
                     versionType: "git",
                  },
                  {
                     lessThan: "2ef422f063b74adcc4a4a9004b0a87bb55e0a836",
                     status: "affected",
                     version: "04876c12c19e94bbbc94bb0446c7bc7cd75163de",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "drivers/infiniband/hw/mlx5/main.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "5.19",
                  },
                  {
                     lessThan: "5.19",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.1.*",
                     status: "unaffected",
                     version: "6.1.63",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.5.*",
                     status: "unaffected",
                     version: "6.5.12",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.6.*",
                     status: "unaffected",
                     version: "6.6.2",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "6.7",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "In the Linux kernel, the following vulnerability has been resolved:\n\nIB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF\n\nIn the unlikely event that workqueue allocation fails and returns NULL in\nmlx5_mkey_cache_init(), delete the call to\nmlx5r_umr_resource_cleanup() (which frees the QP) in\nmlx5_ib_stage_post_ib_reg_umr_init().  This will avoid attempted double\nfree of the same QP when __mlx5_ib_add() does its cleanup.\n\nResolves a splat:\n\n   Syzkaller reported a UAF in ib_destroy_qp_user\n\n   workqueue: Failed to create a rescuer kthread for wq \"mkey_cache\": -EINTR\n   infiniband mlx5_0: mlx5_mkey_cache_init:981:(pid 1642):\n   failed to create work queue\n   infiniband mlx5_0: mlx5_ib_stage_post_ib_reg_umr_init:4075:(pid 1642):\n   mr cache init failed -12\n   ==================================================================\n   BUG: KASAN: slab-use-after-free in ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\n   Read of size 8 at addr ffff88810da310a8 by task repro_upstream/1642\n\n   Call Trace:\n   <TASK>\n   kasan_report (mm/kasan/report.c:590)\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4178)\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\n   ...\n   </TASK>\n\n   Allocated by task 1642:\n   __kmalloc (./include/linux/kasan.h:198 mm/slab_common.c:1026\n   mm/slab_common.c:1039)\n   create_qp (./include/linux/slab.h:603 ./include/linux/slab.h:720\n   ./include/rdma/ib_verbs.h:2795 drivers/infiniband/core/verbs.c:1209)\n   ib_create_qp_kernel (drivers/infiniband/core/verbs.c:1347)\n   mlx5r_umr_resource_init (drivers/infiniband/hw/mlx5/umr.c:164)\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4070)\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\n   ...\n\n   Freed by task 1642:\n   __kmem_cache_free (mm/slub.c:1826 mm/slub.c:3809 mm/slub.c:3822)\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2112)\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4076\n   drivers/infiniband/hw/mlx5/main.c:4065)\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\n   ...",
            },
         ],
         providerMetadata: {
            dateUpdated: "2024-12-19T08:27:11.680Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3",
            },
            {
               url: "https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9",
            },
            {
               url: "https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2",
            },
            {
               url: "https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836",
            },
         ],
         title: "IB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2023-52851",
      datePublished: "2024-05-21T15:31:47.220Z",
      dateReserved: "2024-05-21T15:19:24.255Z",
      dateUpdated: "2024-12-19T08:27:11.680Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2023-52851\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-21T16:15:22.160\",\"lastModified\":\"2025-01-10T17:43:34.967\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nIB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF\\n\\nIn the unlikely event that workqueue allocation fails and returns NULL in\\nmlx5_mkey_cache_init(), delete the call to\\nmlx5r_umr_resource_cleanup() (which frees the QP) in\\nmlx5_ib_stage_post_ib_reg_umr_init().  This will avoid attempted double\\nfree of the same QP when __mlx5_ib_add() does its cleanup.\\n\\nResolves a splat:\\n\\n   Syzkaller reported a UAF in ib_destroy_qp_user\\n\\n   workqueue: Failed to create a rescuer kthread for wq \\\"mkey_cache\\\": -EINTR\\n   infiniband mlx5_0: mlx5_mkey_cache_init:981:(pid 1642):\\n   failed to create work queue\\n   infiniband mlx5_0: mlx5_ib_stage_post_ib_reg_umr_init:4075:(pid 1642):\\n   mr cache init failed -12\\n   ==================================================================\\n   BUG: KASAN: slab-use-after-free in ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\\n   Read of size 8 at addr ffff88810da310a8 by task repro_upstream/1642\\n\\n   Call Trace:\\n   <TASK>\\n   kasan_report (mm/kasan/report.c:590)\\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4178)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\\n   </TASK>\\n\\n   Allocated by task 1642:\\n   __kmalloc (./include/linux/kasan.h:198 mm/slab_common.c:1026\\n   mm/slab_common.c:1039)\\n   create_qp (./include/linux/slab.h:603 ./include/linux/slab.h:720\\n   ./include/rdma/ib_verbs.h:2795 drivers/infiniband/core/verbs.c:1209)\\n   ib_create_qp_kernel (drivers/infiniband/core/verbs.c:1347)\\n   mlx5r_umr_resource_init (drivers/infiniband/hw/mlx5/umr.c:164)\\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4070)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\\n\\n   Freed by task 1642:\\n   __kmem_cache_free (mm/slub.c:1826 mm/slub.c:3809 mm/slub.c:3822)\\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2112)\\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4076\\n   drivers/infiniband/hw/mlx5/main.c:4065)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: IB/mlx5: corrige el manejo de errores de la etapa inicial para evitar la doble liberación del mismo QP y UAF. En el improbable caso de que la asignación de la cola de trabajo falle y devuelva NULL en mlx5_mkey_cache_init(), elimine la llamada a mlx5r_umr_resource_cleanup() (que libera el QP) en mlx5_ib_stage_post_ib_reg_umr_init(). Esto evitará intentos de double free del mismo QP cuando __mlx5_ib_add() realice su limpieza. Resuelve un problema: Syzkaller informó un UAF en ib_destroy_qp_user workqueue: No se pudo crear un kthread de rescate para wq \\\"mkey_cache\\\": -EINTR infiniband mlx5_0: mlx5_mkey_cache_init:981:(pid 1642): no se pudo crear la cola de trabajo infiniband mlx5_0: mlx5_ib_stage_post_ib_reg_umr_ inicio: 4075: (pid 1642): el inicio de caché de mr falló -12 ========================================= =========================== BUG: KASAN: uso de losa después de la liberación en ib_destroy_qp_user (drivers/infiniband/core/verbs.c :2073) Lectura de tamaño 8 en la dirección ffff88810da310a8 mediante la tarea repro_upstream/1642 Rastreo de llamadas:  kasan_report (mm/kasan/report.c:590) ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073) mlx5r_umr_resource_cleanup (drivers /infiniband/hw/mlx5/umr.c:198) __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4178) mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402) ...  Asignado por la tarea 1642: __kmalloc (./include/linux/kasan.h:198 mm/slab_common.c:1026 mm/slab_common.c:1039) create_qp (./include/linux/slab.h:603 ./ include/linux/slab.h:720 ./include/rdma/ib_verbs.h:2795 drivers/infiniband/core/verbs.c:1209) ib_create_qp_kernel (drivers/infiniband/core/verbs.c:1347) mlx5r_umr_resource_init (drivers/ infiniband/hw/mlx5/umr.c:164) mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4070) __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168) mlx5r_probe (drivers/infiniband/ hw/mlx5/main.c:4402) ... Liberado por la tarea 1642: __kmem_cache_free (mm/slub.c:1826 mm/slub.c:3809 mm/slub.c:3822) ib_destroy_qp_user (drivers/infiniband/core/ verbs.c:2112) mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198) mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4076 drivers/infiniband/hw/mlx5/main.c:4065 ) __mlx5_ib_add (controladores/infiniband/hw/mlx5/main.c:4168) mlx5r_probe (controladores/infiniband/hw/mlx5/main.c:4402) ...\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-415\"},{\"lang\":\"en\",\"value\":\"CWE-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.19\",\"versionEndExcluding\":\"6.1.63\",\"matchCriteriaId\":\"E81007DE-C3E6-483B-8B77-F444159C176E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.5.12\",\"matchCriteriaId\":\"825F64D9-E99F-49AA-8A7B-EF7C2965C5B2\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.6\",\"versionEndExcluding\":\"6.6.2\",\"matchCriteriaId\":\"4CBFF885-A4D3-4F21-B6FD-4D770034C048\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]}]}}",
      vulnrichment: {
         containers: "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T23:11:36.176Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-52851\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-05-22T18:56:10.534699Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-22T18:56:16.549Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"IB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"04876c12c19e\", \"lessThan\": \"437f033e30c8\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"04876c12c19e\", \"lessThan\": \"4f4a7a7d1404\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"04876c12c19e\", \"lessThan\": \"6387f269d84e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"04876c12c19e\", \"lessThan\": \"2ef422f063b7\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/infiniband/hw/mlx5/main.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.19\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.19\", \"versionType\": \"custom\"}, {\"status\": \"unaffected\", \"version\": \"6.1.63\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.5.12\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.5.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.2\", \"versionType\": \"custom\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.7\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/infiniband/hw/mlx5/main.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/437f033e30c897bb3723eac9e9003cd9f88d00a3\"}, {\"url\": \"https://git.kernel.org/stable/c/4f4a7a7d1404297f2a92df0046f7e64dc5c52dd9\"}, {\"url\": \"https://git.kernel.org/stable/c/6387f269d84e6e149499408c4d1fc805017729b2\"}, {\"url\": \"https://git.kernel.org/stable/c/2ef422f063b74adcc4a4a9004b0a87bb55e0a836\"}], \"x_generator\": {\"engine\": \"bippy-a5840b7849dd\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nIB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF\\n\\nIn the unlikely event that workqueue allocation fails and returns NULL in\\nmlx5_mkey_cache_init(), delete the call to\\nmlx5r_umr_resource_cleanup() (which frees the QP) in\\nmlx5_ib_stage_post_ib_reg_umr_init().  This will avoid attempted double\\nfree of the same QP when __mlx5_ib_add() does its cleanup.\\n\\nResolves a splat:\\n\\n   Syzkaller reported a UAF in ib_destroy_qp_user\\n\\n   workqueue: Failed to create a rescuer kthread for wq \\\"mkey_cache\\\": -EINTR\\n   infiniband mlx5_0: mlx5_mkey_cache_init:981:(pid 1642):\\n   failed to create work queue\\n   infiniband mlx5_0: mlx5_ib_stage_post_ib_reg_umr_init:4075:(pid 1642):\\n   mr cache init failed -12\\n   ==================================================================\\n   BUG: KASAN: slab-use-after-free in ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\\n   Read of size 8 at addr ffff88810da310a8 by task repro_upstream/1642\\n\\n   Call Trace:\\n   <TASK>\\n   kasan_report (mm/kasan/report.c:590)\\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2073)\\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4178)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\\n   </TASK>\\n\\n   Allocated by task 1642:\\n   __kmalloc (./include/linux/kasan.h:198 mm/slab_common.c:1026\\n   mm/slab_common.c:1039)\\n   create_qp (./include/linux/slab.h:603 ./include/linux/slab.h:720\\n   ./include/rdma/ib_verbs.h:2795 drivers/infiniband/core/verbs.c:1209)\\n   ib_create_qp_kernel (drivers/infiniband/core/verbs.c:1347)\\n   mlx5r_umr_resource_init (drivers/infiniband/hw/mlx5/umr.c:164)\\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4070)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\\n\\n   Freed by task 1642:\\n   __kmem_cache_free (mm/slub.c:1826 mm/slub.c:3809 mm/slub.c:3822)\\n   ib_destroy_qp_user (drivers/infiniband/core/verbs.c:2112)\\n   mlx5r_umr_resource_cleanup (drivers/infiniband/hw/mlx5/umr.c:198)\\n   mlx5_ib_stage_post_ib_reg_umr_init (drivers/infiniband/hw/mlx5/main.c:4076\\n   drivers/infiniband/hw/mlx5/main.c:4065)\\n   __mlx5_ib_add (drivers/infiniband/hw/mlx5/main.c:4168)\\n   mlx5r_probe (drivers/infiniband/hw/mlx5/main.c:4402)\\n   ...\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-05-29T05:18:27.094Z\"}}}",
         cveMetadata: "{\"cveId\": \"CVE-2023-52851\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-08-02T23:11:36.176Z\", \"dateReserved\": \"2024-05-21T15:19:24.255Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-21T15:31:47.220Z\", \"assignerShortName\": \"Linux\"}",
         dataType: "CVE_RECORD",
         dataVersion: "5.1",
      },
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.