cve-2024-35853
Vulnerability from cvelistv5
Published
2024-05-17 14:47
Modified
2024-08-02 03:21
Severity
Summary
mlxsw: spectrum_acl_tcam: Fix memory leak during rehash
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "affected",
            "product": "linux_kernel",
            "vendor": "linux",
            "versions": [
              {
                "lessThan": "c6f3fa7f5a74",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "617e98ba4c50",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "413a01886c39",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "b822644fd909",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "0ae8ff7b6d42",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "b3fd51f684a0",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              },
              {
                "lessThan": "8ca3f7a7b613",
                "status": "affected",
                "version": "843500518509",
                "versionType": "git"
              }
            ]
          }
        ],
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "HIGH",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 6.4,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "LOW",
              "integrityImpact": "LOW",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2024-35853",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-20T17:34:35.252109Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-01T13:51:48.800Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T03:21:48.394Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c6f3fa7f5a748bf6e5c4eb742686d6952f854e76"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/617e98ba4c50f4547c9eb0946b1cfc26937d70d1"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/413a01886c3958d4b8aac23a3bff3d430b92093e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b822644fd90992ee362c5e0c8d2556efc8856c76"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0ae8ff7b6d42e33943af462910bdcfa2ec0cb8cf"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b3fd51f684a0711504f82de510da109ae639722d"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/8ca3f7a7b61393804c46f170743c3b839df13977"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c6f3fa7f5a74",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "617e98ba4c50",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "413a01886c39",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "b822644fd909",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "0ae8ff7b6d42",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "b3fd51f684a0",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            },
            {
              "lessThan": "8ca3f7a7b613",
              "status": "affected",
              "version": "843500518509",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.1"
            },
            {
              "lessThan": "5.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.275",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.216",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.158",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.90",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.30",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.9",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmlxsw: spectrum_acl_tcam: Fix memory leak during rehash\n\nThe rehash delayed work migrates filters from one region to another.\nThis is done by iterating over all chunks (all the filters with the same\npriority) in the region and in each chunk iterating over all the\nfilters.\n\nIf the migration fails, the code tries to migrate the filters back to\nthe old region. However, the rollback itself can also fail in which case\nanother migration will be erroneously performed. Besides the fact that\nthis ping pong is not a very good idea, it also creates a problem.\n\nEach virtual chunk references two chunks: The currently used one\n(\u0027vchunk-\u003echunk\u0027) and a backup (\u0027vchunk-\u003echunk2\u0027). During migration the\nfirst holds the chunk we want to migrate filters to and the second holds\nthe chunk we are migrating filters from.\n\nThe code currently assumes - but does not verify - that the backup chunk\ndoes not exist (NULL) if the currently used chunk does not reference the\ntarget region. This assumption breaks when we are trying to rollback a\nrollback, resulting in the backup chunk being overwritten and leaked\n[1].\n\nFix by not rolling back a failed rollback and add a warning to avoid\nfuture cases.\n\n[1]\nWARNING: CPU: 5 PID: 1063 at lib/parman.c:291 parman_destroy+0x17/0x20\nModules linked in:\nCPU: 5 PID: 1063 Comm: kworker/5:11 Tainted: G        W          6.9.0-rc2-custom-00784-gc6a05c468a0b #14\nHardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019\nWorkqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work\nRIP: 0010:parman_destroy+0x17/0x20\n[...]\nCall Trace:\n \u003cTASK\u003e\n mlxsw_sp_acl_atcam_region_fini+0x19/0x60\n mlxsw_sp_acl_tcam_region_destroy+0x49/0xf0\n mlxsw_sp_acl_tcam_vregion_rehash_work+0x1f1/0x470\n process_one_work+0x151/0x370\n worker_thread+0x2cb/0x3e0\n kthread+0xd0/0x100\n ret_from_fork+0x34/0x50\n ret_from_fork_asm+0x1a/0x30\n \u003c/TASK\u003e"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:30:09.181Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c6f3fa7f5a748bf6e5c4eb742686d6952f854e76"
        },
        {
          "url": "https://git.kernel.org/stable/c/617e98ba4c50f4547c9eb0946b1cfc26937d70d1"
        },
        {
          "url": "https://git.kernel.org/stable/c/413a01886c3958d4b8aac23a3bff3d430b92093e"
        },
        {
          "url": "https://git.kernel.org/stable/c/b822644fd90992ee362c5e0c8d2556efc8856c76"
        },
        {
          "url": "https://git.kernel.org/stable/c/0ae8ff7b6d42e33943af462910bdcfa2ec0cb8cf"
        },
        {
          "url": "https://git.kernel.org/stable/c/b3fd51f684a0711504f82de510da109ae639722d"
        },
        {
          "url": "https://git.kernel.org/stable/c/8ca3f7a7b61393804c46f170743c3b839df13977"
        },
        {
          "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"
        }
      ],
      "title": "mlxsw: spectrum_acl_tcam: Fix memory leak during rehash",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-35853",
    "datePublished": "2024-05-17T14:47:30.109Z",
    "dateReserved": "2024-05-17T13:50:33.106Z",
    "dateUpdated": "2024-08-02T03:21:48.394Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-35853\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-17T15:15:22.220\",\"lastModified\":\"2024-08-01T14:35:10.720\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmlxsw: spectrum_acl_tcam: Fix memory leak during rehash\\n\\nThe rehash delayed work migrates filters from one region to another.\\nThis is done by iterating over all chunks (all the filters with the same\\npriority) in the region and in each chunk iterating over all the\\nfilters.\\n\\nIf the migration fails, the code tries to migrate the filters back to\\nthe old region. However, the rollback itself can also fail in which case\\nanother migration will be erroneously performed. Besides the fact that\\nthis ping pong is not a very good idea, it also creates a problem.\\n\\nEach virtual chunk references two chunks: The currently used one\\n(\u0027vchunk-\u003echunk\u0027) and a backup (\u0027vchunk-\u003echunk2\u0027). During migration the\\nfirst holds the chunk we want to migrate filters to and the second holds\\nthe chunk we are migrating filters from.\\n\\nThe code currently assumes - but does not verify - that the backup chunk\\ndoes not exist (NULL) if the currently used chunk does not reference the\\ntarget region. This assumption breaks when we are trying to rollback a\\nrollback, resulting in the backup chunk being overwritten and leaked\\n[1].\\n\\nFix by not rolling back a failed rollback and add a warning to avoid\\nfuture cases.\\n\\n[1]\\nWARNING: CPU: 5 PID: 1063 at lib/parman.c:291 parman_destroy+0x17/0x20\\nModules linked in:\\nCPU: 5 PID: 1063 Comm: kworker/5:11 Tainted: G        W          6.9.0-rc2-custom-00784-gc6a05c468a0b #14\\nHardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019\\nWorkqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work\\nRIP: 0010:parman_destroy+0x17/0x20\\n[...]\\nCall Trace:\\n \u003cTASK\u003e\\n mlxsw_sp_acl_atcam_region_fini+0x19/0x60\\n mlxsw_sp_acl_tcam_region_destroy+0x49/0xf0\\n mlxsw_sp_acl_tcam_vregion_rehash_work+0x1f1/0x470\\n process_one_work+0x151/0x370\\n worker_thread+0x2cb/0x3e0\\n kthread+0xd0/0x100\\n ret_from_fork+0x34/0x50\\n ret_from_fork_asm+0x1a/0x30\\n \u003c/TASK\u003e\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: mlxsw: spectrum_acl_tcam: corrige la p\u00e9rdida de memoria durante el rehash El trabajo retrasado del rehash migra los filtros de una regi\u00f3n a otra. Esto se hace iterando sobre todos los fragmentos (todos los filtros con la misma prioridad) en la regi\u00f3n y en cada fragmento iterando sobre todos los filtros. Si la migraci\u00f3n fallo, el c\u00f3digo intenta migrar los filtros nuevamente a la regi\u00f3n anterior. Sin embargo, la reversi\u00f3n en s\u00ed tambi\u00e9n puede fallor, en cuyo caso se realizar\u00e1 otra migraci\u00f3n por error. Adem\u00e1s de que este ping pong no es una muy buena idea, tambi\u00e9n crea un problema. Cada fragmento virtual hace referencia a dos fragmentos: el que se utiliza actualmente (\u0027vchunk-\u0026gt;chunk\u0027) y una copia de seguridad (\u0027vchunk-\u0026gt;chunk2\u0027). Durante la migraci\u00f3n, el primero contiene el fragmento al que queremos migrar los filtros y el segundo contiene el fragmento desde el que estamos migrando los filtros. Actualmente, el c\u00f3digo supone, pero no verifica, que el fragmento de copia de seguridad no existe (NULL) si el fragmento utilizado actualmente no hace referencia a la regi\u00f3n de destino. Esta suposici\u00f3n se rompe cuando intentamos revertir una reversi\u00f3n, lo que provoca que el fragmento de copia de seguridad se sobrescriba y se filtre [1]. Corrija al no revertir una reversi\u00f3n fallida y agregue una advertencia para evitar casos futuros. [1] ADVERTENCIA: CPU: 5 PID: 1063 en lib/parman.c:291 parman_destroy+0x17/0x20 M\u00f3dulos vinculados en: CPU: 5 PID: 1063 Comm: kworker/5:11 Tainted: GW 6.9.0-rc2- custom-00784-gc6a05c468a0b #14 Nombre del hardware: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 06/01/2019 Cola de trabajo: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:parman_destroy+0x17/0x20 [...] :  mlxsw_sp_acl_atcam_region_fini +0x19/0x60 mlxsw_sp_acl_tcam_region_destroy+0x49/0xf0 mlxsw_sp_acl_tcam_vregion_rehash_work+0x1f1/0x470 proceso_one_work+0x151/0x370 trabajador_hilo+0x2cb/0x3e0 kthread+0xd0/0x100 k+0x34/0x50 ret_from_fork_asm+0x1a/0x30 \"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"LOW\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"HIGH\",\"baseScore\":6.4,\"baseSeverity\":\"MEDIUM\"},\"exploitabilityScore\":1.6,\"impactScore\":4.7}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0ae8ff7b6d42e33943af462910bdcfa2ec0cb8cf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/413a01886c3958d4b8aac23a3bff3d430b92093e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/617e98ba4c50f4547c9eb0946b1cfc26937d70d1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8ca3f7a7b61393804c46f170743c3b839df13977\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b3fd51f684a0711504f82de510da109ae639722d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b822644fd90992ee362c5e0c8d2556efc8856c76\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c6f3fa7f5a748bf6e5c4eb742686d6952f854e76\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...