cve-2024-43880
Vulnerability from cvelistv5
Published
2024-08-21 00:06
Modified
2024-11-05 09:41
Severity ?
Summary
mlxsw: spectrum_acl_erp: Fix object nesting warning
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-43880",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:05:51.322073Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-12T17:33:17.371Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c",
            "include/linux/objagg.h",
            "lib/objagg.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "4dc09f6f260d",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "36a9996e020d",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "9a5261a984bb",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "25c6fd9648ad",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "0e59c2d22853",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "fb5d4fc578e6",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            },
            {
              "lessThan": "97d833ceb27d",
              "status": "affected",
              "version": "9069a3817d82",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c",
            "include/linux/objagg.h",
            "lib/objagg.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": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.282",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.224",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.165",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.103",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.44",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.11",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmlxsw: spectrum_acl_erp: Fix object nesting warning\n\nACLs in Spectrum-2 and newer ASICs can reside in the algorithmic TCAM\n(A-TCAM) or in the ordinary circuit TCAM (C-TCAM). The former can\ncontain more ACLs (i.e., tc filters), but the number of masks in each\nregion (i.e., tc chain) is limited.\n\nIn order to mitigate the effects of the above limitation, the device\nallows filters to share a single mask if their masks only differ in up\nto 8 consecutive bits. For example, dst_ip/25 can be represented using\ndst_ip/24 with a delta of 1 bit. The C-TCAM does not have a limit on the\nnumber of masks being used (and therefore does not support mask\naggregation), but can contain a limited number of filters.\n\nThe driver uses the \"objagg\" library to perform the mask aggregation by\npassing it objects that consist of the filter\u0027s mask and whether the\nfilter is to be inserted into the A-TCAM or the C-TCAM since filters in\ndifferent TCAMs cannot share a mask.\n\nThe set of created objects is dependent on the insertion order of the\nfilters and is not necessarily optimal. Therefore, the driver will\nperiodically ask the library to compute a more optimal set (\"hints\") by\nlooking at all the existing objects.\n\nWhen the library asks the driver whether two objects can be aggregated\nthe driver only compares the provided masks and ignores the A-TCAM /\nC-TCAM indication. This is the right thing to do since the goal is to\nmove as many filters as possible to the A-TCAM. The driver also forbids\ntwo identical masks from being aggregated since this can only happen if\none was intentionally put in the C-TCAM to avoid a conflict in the\nA-TCAM.\n\nThe above can result in the following set of hints:\n\nH1: {mask X, A-TCAM} -\u003e H2: {mask Y, A-TCAM} // X is Y + delta\nH3: {mask Y, C-TCAM} -\u003e H4: {mask Z, A-TCAM} // Y is Z + delta\n\nAfter getting the hints from the library the driver will start migrating\nfilters from one region to another while consulting the computed hints\nand instructing the device to perform a lookup in both regions during\nthe transition.\n\nAssuming a filter with mask X is being migrated into the A-TCAM in the\nnew region, the hints lookup will return H1. Since H2 is the parent of\nH1, the library will try to find the object associated with it and\ncreate it if necessary in which case another hints lookup (recursive)\nwill be performed. This hints lookup for {mask Y, A-TCAM} will either\nreturn H2 or H3 since the driver passes the library an object comparison\nfunction that ignores the A-TCAM / C-TCAM indication.\n\nThis can eventually lead to nested objects which are not supported by\nthe library [1].\n\nFix by removing the object comparison function from both the driver and\nthe library as the driver was the only user. That way the lookup will\nonly return exact matches.\n\nI do not have a reliable reproducer that can reproduce the issue in a\ntimely manner, but before the fix the issue would reproduce in several\nminutes and with the fix it does not reproduce in over an hour.\n\nNote that the current usefulness of the hints is limited because they\ninclude the C-TCAM indication and represent aggregation that cannot\nactually happen. This will be addressed in net-next.\n\n[1]\nWARNING: CPU: 0 PID: 153 at lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0\nModules linked in:\nCPU: 0 PID: 153 Comm: kworker/0:18 Not tainted 6.9.0-rc6-custom-g70fbc2c1c38b #42\nHardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018\nWorkqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work\nRIP: 0010:objagg_obj_parent_assign+0xb5/0xd0\n[...]\nCall Trace:\n \u003cTASK\u003e\n __objagg_obj_get+0x2bb/0x580\n objagg_obj_get+0xe/0x80\n mlxsw_sp_acl_erp_mask_get+0xb5/0xf0\n mlxsw_sp_acl_atcam_entry_add+0xe8/0x3c0\n mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0\n mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270\n mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510\n process_one_work+0x151/0x370"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:41:42.622Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/4dc09f6f260db3c4565a4ec52ba369393598f2fb"
        },
        {
          "url": "https://git.kernel.org/stable/c/36a9996e020dd5aa325e0ecc55eb2328288ea6bb"
        },
        {
          "url": "https://git.kernel.org/stable/c/9a5261a984bba4f583d966c550fa72c33ff3714e"
        },
        {
          "url": "https://git.kernel.org/stable/c/25c6fd9648ad05da493a5d30881896a78a08b624"
        },
        {
          "url": "https://git.kernel.org/stable/c/0e59c2d22853266704e127915653598f7f104037"
        },
        {
          "url": "https://git.kernel.org/stable/c/fb5d4fc578e655d113f09565f6f047e15f7ab578"
        },
        {
          "url": "https://git.kernel.org/stable/c/97d833ceb27dc19f8777d63f90be4a27b5daeedf"
        }
      ],
      "title": "mlxsw: spectrum_acl_erp: Fix object nesting warning",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-43880",
    "datePublished": "2024-08-21T00:06:32.562Z",
    "dateReserved": "2024-08-17T09:11:59.287Z",
    "dateUpdated": "2024-11-05T09:41:42.622Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-43880\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-08-21T01:15:12.213\",\"lastModified\":\"2024-08-21T12:30:33.697\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmlxsw: spectrum_acl_erp: Fix object nesting warning\\n\\nACLs in Spectrum-2 and newer ASICs can reside in the algorithmic TCAM\\n(A-TCAM) or in the ordinary circuit TCAM (C-TCAM). The former can\\ncontain more ACLs (i.e., tc filters), but the number of masks in each\\nregion (i.e., tc chain) is limited.\\n\\nIn order to mitigate the effects of the above limitation, the device\\nallows filters to share a single mask if their masks only differ in up\\nto 8 consecutive bits. For example, dst_ip/25 can be represented using\\ndst_ip/24 with a delta of 1 bit. The C-TCAM does not have a limit on the\\nnumber of masks being used (and therefore does not support mask\\naggregation), but can contain a limited number of filters.\\n\\nThe driver uses the \\\"objagg\\\" library to perform the mask aggregation by\\npassing it objects that consist of the filter\u0027s mask and whether the\\nfilter is to be inserted into the A-TCAM or the C-TCAM since filters in\\ndifferent TCAMs cannot share a mask.\\n\\nThe set of created objects is dependent on the insertion order of the\\nfilters and is not necessarily optimal. Therefore, the driver will\\nperiodically ask the library to compute a more optimal set (\\\"hints\\\") by\\nlooking at all the existing objects.\\n\\nWhen the library asks the driver whether two objects can be aggregated\\nthe driver only compares the provided masks and ignores the A-TCAM /\\nC-TCAM indication. This is the right thing to do since the goal is to\\nmove as many filters as possible to the A-TCAM. The driver also forbids\\ntwo identical masks from being aggregated since this can only happen if\\none was intentionally put in the C-TCAM to avoid a conflict in the\\nA-TCAM.\\n\\nThe above can result in the following set of hints:\\n\\nH1: {mask X, A-TCAM} -\u003e H2: {mask Y, A-TCAM} // X is Y + delta\\nH3: {mask Y, C-TCAM} -\u003e H4: {mask Z, A-TCAM} // Y is Z + delta\\n\\nAfter getting the hints from the library the driver will start migrating\\nfilters from one region to another while consulting the computed hints\\nand instructing the device to perform a lookup in both regions during\\nthe transition.\\n\\nAssuming a filter with mask X is being migrated into the A-TCAM in the\\nnew region, the hints lookup will return H1. Since H2 is the parent of\\nH1, the library will try to find the object associated with it and\\ncreate it if necessary in which case another hints lookup (recursive)\\nwill be performed. This hints lookup for {mask Y, A-TCAM} will either\\nreturn H2 or H3 since the driver passes the library an object comparison\\nfunction that ignores the A-TCAM / C-TCAM indication.\\n\\nThis can eventually lead to nested objects which are not supported by\\nthe library [1].\\n\\nFix by removing the object comparison function from both the driver and\\nthe library as the driver was the only user. That way the lookup will\\nonly return exact matches.\\n\\nI do not have a reliable reproducer that can reproduce the issue in a\\ntimely manner, but before the fix the issue would reproduce in several\\nminutes and with the fix it does not reproduce in over an hour.\\n\\nNote that the current usefulness of the hints is limited because they\\ninclude the C-TCAM indication and represent aggregation that cannot\\nactually happen. This will be addressed in net-next.\\n\\n[1]\\nWARNING: CPU: 0 PID: 153 at lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0\\nModules linked in:\\nCPU: 0 PID: 153 Comm: kworker/0:18 Not tainted 6.9.0-rc6-custom-g70fbc2c1c38b #42\\nHardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018\\nWorkqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work\\nRIP: 0010:objagg_obj_parent_assign+0xb5/0xd0\\n[...]\\nCall Trace:\\n \u003cTASK\u003e\\n __objagg_obj_get+0x2bb/0x580\\n objagg_obj_get+0xe/0x80\\n mlxsw_sp_acl_erp_mask_get+0xb5/0xf0\\n mlxsw_sp_acl_atcam_entry_add+0xe8/0x3c0\\n mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0\\n mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270\\n mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510\\n process_one_work+0x151/0x370\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mlxsw: espectro_acl_erp: corrige la advertencia de anidamiento de objetos. Las ACL en Spectrum-2 y los ASIC m\u00e1s nuevos pueden residir en el TCAM algor\u00edtmico (A-TCAM) o en el TCAM de circuito ordinario (C-TCAM). El primero puede contener m\u00e1s ACL (es decir, filtros tc), pero el n\u00famero de m\u00e1scaras en cada regi\u00f3n (es decir, cadena tc) es limitado. Para mitigar los efectos de la limitaci\u00f3n anterior, el dispositivo permite que los filtros compartan una \u00fanica m\u00e1scara si sus m\u00e1scaras solo difieren en hasta 8 bits consecutivos. Por ejemplo, dst_ip/25 se puede representar usando dst_ip/24 con un delta de 1 bit. C-TCAM no tiene un l\u00edmite en la cantidad de m\u00e1scaras que se utilizan (y por lo tanto no admite la agregaci\u00f3n de m\u00e1scaras), pero puede contener una cantidad limitada de filtros. El controlador utiliza la librer\u00eda \\\"objagg\\\" para realizar la agregaci\u00f3n de m\u00e1scaras pas\u00e1ndole objetos que constan de la m\u00e1scara del filtro y si el filtro se insertar\u00e1 en la A-TCAM o en la C-TCAM, ya que los filtros en diferentes TCAM no pueden compartir una m\u00e1scara. El conjunto de objetos creados depende del orden de inserci\u00f3n de los filtros y no es necesariamente \u00f3ptimo. Por lo tanto, el controlador solicitar\u00e1 peri\u00f3dicamente a la librer\u00eda que calcule un conjunto m\u00e1s \u00f3ptimo (\\\"sugerencias\\\") observando todos los objetos existentes. Cuando la librer\u00eda pregunta al controlador si se pueden agregar dos objetos, el controlador solo compara las m\u00e1scaras proporcionadas e ignora la indicaci\u00f3n A-TCAM/C-TCAM. Esto es lo correcto ya que el objetivo es mover tantos filtros como sea posible a la A-TCAM. El conductor tambi\u00e9n proh\u00edbe agregar dos m\u00e1scaras id\u00e9nticas, ya que esto solo puede suceder si una se coloc\u00f3 intencionalmente en la C-TCAM para evitar un conflicto en la A-TCAM. Lo anterior puede dar como resultado el siguiente conjunto de sugerencias: H1: {m\u00e1scara X, A-TCAM} -\u0026gt; H2: {m\u00e1scara Y, A-TCAM} // X es Y + delta H3: {m\u00e1scara Y, C-TCAM} -\u0026gt; H4: {m\u00e1scara Z, A-TCAM} // Y es Z + delta Despu\u00e9s de obtener las sugerencias de la librer\u00eda, el controlador comenzar\u00e1 a migrar filtros de una regi\u00f3n a otra mientras consulta las sugerencias calculadas e indica al dispositivo que realice una b\u00fasqueda. en ambas regiones durante la transici\u00f3n. Suponiendo que se est\u00e1 migrando un filtro con m\u00e1scara X a la A-TCAM en la nueva regi\u00f3n, la b\u00fasqueda de sugerencias devolver\u00e1 H1. Dado que H2 es el padre de H1, la librer\u00eda intentar\u00e1 encontrar el objeto asociado con \u00e9l y crearlo si es necesario, en cuyo caso se realizar\u00e1 otra b\u00fasqueda de sugerencias (recursiva). Esta b\u00fasqueda de sugerencias para {m\u00e1scara Y, A-TCAM} devolver\u00e1 H2 o H3 ya que el controlador pasa a la librer\u00eda una funci\u00f3n de comparaci\u00f3n de objetos que ignora la indicaci\u00f3n A-TCAM/C-TCAM. En \u00faltima instancia, esto puede conducir a objetos anidados que no son compatibles con la librer\u00eda [1]. Para solucionarlo, elimine la funci\u00f3n de comparaci\u00f3n de objetos tanto del controlador como de la librer\u00eda, ya que el controlador era el \u00fanico usuario. De esa forma, la b\u00fasqueda solo arrojar\u00e1 coincidencias exactas. No tengo un reproductor confiable que pueda reproducir el problema de manera oportuna, pero antes de solucionarlo, el problema se reproduc\u00eda en varios minutos y con la soluci\u00f3n no se reproduce en m\u00e1s de una hora. Tenga en cuenta que la utilidad actual de las sugerencias es limitada porque incluyen la indicaci\u00f3n C-TCAM y representan una agregaci\u00f3n que en realidad no puede ocurrir. Esto se abordar\u00e1 en net-next. [1] ADVERTENCIA: CPU: 0 PID: 153 en lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0 M\u00f3dulos vinculados en: CPU: 0 PID: 153 Comm: kworker/0:18 No contaminado 6.9.0-rc6-custom -g70fbc2c1c38b #42 Nombre del hardware: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 Cola de trabajo: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:objagg_obj_parent_assign+0xb5/0xd0 [...] Seguimiento de llamadas: \u0026lt; TAREA\u0026gt; ---truncado----\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0e59c2d22853266704e127915653598f7f104037\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/25c6fd9648ad05da493a5d30881896a78a08b624\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/36a9996e020dd5aa325e0ecc55eb2328288ea6bb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4dc09f6f260db3c4565a4ec52ba369393598f2fb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/97d833ceb27dc19f8777d63f90be4a27b5daeedf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9a5261a984bba4f583d966c550fa72c33ff3714e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/fb5d4fc578e655d113f09565f6f047e15f7ab578\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




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.