cve-2024-26924
Vulnerability from cvelistv5
Published
2024-04-24 21:49
Modified
2024-08-02 00:21
Severity
Summary
netfilter: nft_set_pipapo: do not free live element
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:o:linux:linux_kernel:5.6:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "linux_kernel",
            "vendor": "linux",
            "versions": [
              {
                "status": "affected",
                "version": "5.6"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "linux_kernel",
            "vendor": "linux",
            "versions": [
              {
                "status": "affected",
                "version": "3c4287f62044"
              }
            ]
          }
        ],
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "HIGH",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 5.9,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2024-26924",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-04-29T16:46:54.309255Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-476",
                "description": "CWE-476 NULL Pointer Dereference",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:49:06.077Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:21:05.445Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e3b887a9c11caf8357a821260e095f2a694a34f2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/7a1679e2d9bfa3b5f8755c2c7113e54b7d42bd46"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/41d8fdf3afaff312e17466e4ab732937738d5644"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ebf7c9746f073035ee26209e38c3a1170f7b349a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/14b001ba221136c15f894577253e8db535b99487"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3cfc9ec039af60dbd8965ae085b2c2ccdcfbe1cc"
          },
          {
            "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": [
            "net/netfilter/nft_set_pipapo.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e3b887a9c11c",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            },
            {
              "lessThan": "7a1679e2d9bf",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            },
            {
              "lessThan": "41d8fdf3afaf",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            },
            {
              "lessThan": "ebf7c9746f07",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            },
            {
              "lessThan": "14b001ba2211",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            },
            {
              "lessThan": "3cfc9ec039af",
              "status": "affected",
              "version": "3c4287f62044",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/netfilter/nft_set_pipapo.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.6"
            },
            {
              "lessThan": "5.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.216",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.157",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.88",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.29",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.8",
              "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\nnetfilter: nft_set_pipapo: do not free live element\n\nPablo reports a crash with large batches of elements with a\nback-to-back add/remove pattern.  Quoting Pablo:\n\n  add_elem(\"00000000\") timeout 100 ms\n  ...\n  add_elem(\"0000000X\") timeout 100 ms\n  del_elem(\"0000000X\") \u003c---------------- delete one that was just added\n  ...\n  add_elem(\"00005000\") timeout 100 ms\n\n  1) nft_pipapo_remove() removes element 0000000X\n  Then, KASAN shows a splat.\n\nLooking at the remove function there is a chance that we will drop a\nrule that maps to a non-deactivated element.\n\nRemoval happens in two steps, first we do a lookup for key k and return the\nto-be-removed element and mark it as inactive in the next generation.\nThen, in a second step, the element gets removed from the set/map.\n\nThe _remove function does not work correctly if we have more than one\nelement that share the same key.\n\nThis can happen if we insert an element into a set when the set already\nholds an element with same key, but the element mapping to the existing\nkey has timed out or is not active in the next generation.\n\nIn such case its possible that removal will unmap the wrong element.\nIf this happens, we will leak the non-deactivated element, it becomes\nunreachable.\n\nThe element that got deactivated (and will be freed later) will\nremain reachable in the set data structure, this can result in\na crash when such an element is retrieved during lookup (stale\npointer).\n\nAdd a check that the fully matching key does in fact map to the element\nthat we have marked as inactive in the deactivation step.\nIf not, we need to continue searching.\n\nAdd a bug/warn trap at the end of the function as well, the remove\nfunction must not ever be called with an invisible/unreachable/non-existent\nelement.\n\nv2: avoid uneeded temporary variable (Stefano)"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:25:06.506Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e3b887a9c11caf8357a821260e095f2a694a34f2"
        },
        {
          "url": "https://git.kernel.org/stable/c/7a1679e2d9bfa3b5f8755c2c7113e54b7d42bd46"
        },
        {
          "url": "https://git.kernel.org/stable/c/41d8fdf3afaff312e17466e4ab732937738d5644"
        },
        {
          "url": "https://git.kernel.org/stable/c/ebf7c9746f073035ee26209e38c3a1170f7b349a"
        },
        {
          "url": "https://git.kernel.org/stable/c/14b001ba221136c15f894577253e8db535b99487"
        },
        {
          "url": "https://git.kernel.org/stable/c/3cfc9ec039af60dbd8965ae085b2c2ccdcfbe1cc"
        },
        {
          "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"
        }
      ],
      "title": "netfilter: nft_set_pipapo: do not free live element",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26924",
    "datePublished": "2024-04-24T21:49:22.631Z",
    "dateReserved": "2024-02-19T14:20:24.194Z",
    "dateUpdated": "2024-08-02T00:21:05.445Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-26924\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-25T06:15:57.407\",\"lastModified\":\"2024-07-03T01:50:00.957\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnetfilter: nft_set_pipapo: do not free live element\\n\\nPablo reports a crash with large batches of elements with a\\nback-to-back add/remove pattern.  Quoting Pablo:\\n\\n  add_elem(\\\"00000000\\\") timeout 100 ms\\n  ...\\n  add_elem(\\\"0000000X\\\") timeout 100 ms\\n  del_elem(\\\"0000000X\\\") \u003c---------------- delete one that was just added\\n  ...\\n  add_elem(\\\"00005000\\\") timeout 100 ms\\n\\n  1) nft_pipapo_remove() removes element 0000000X\\n  Then, KASAN shows a splat.\\n\\nLooking at the remove function there is a chance that we will drop a\\nrule that maps to a non-deactivated element.\\n\\nRemoval happens in two steps, first we do a lookup for key k and return the\\nto-be-removed element and mark it as inactive in the next generation.\\nThen, in a second step, the element gets removed from the set/map.\\n\\nThe _remove function does not work correctly if we have more than one\\nelement that share the same key.\\n\\nThis can happen if we insert an element into a set when the set already\\nholds an element with same key, but the element mapping to the existing\\nkey has timed out or is not active in the next generation.\\n\\nIn such case its possible that removal will unmap the wrong element.\\nIf this happens, we will leak the non-deactivated element, it becomes\\nunreachable.\\n\\nThe element that got deactivated (and will be freed later) will\\nremain reachable in the set data structure, this can result in\\na crash when such an element is retrieved during lookup (stale\\npointer).\\n\\nAdd a check that the fully matching key does in fact map to the element\\nthat we have marked as inactive in the deactivation step.\\nIf not, we need to continue searching.\\n\\nAdd a bug/warn trap at the end of the function as well, the remove\\nfunction must not ever be called with an invisible/unreachable/non-existent\\nelement.\\n\\nv2: avoid uneeded temporary variable (Stefano)\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfilter: nft_set_pipapo: no liberar elemento activo Pablo informa un bloqueo con grandes lotes de elementos con un patr\u00f3n de agregar/eliminar consecutivos. Citando a Pablo: add_elem(\\\"00000000\\\") timeout 100 ms ... add_elem(\\\"0000000X\\\") timeout 100 ms del_elem(\\\"0000000X\\\") \u0026lt;---------------- elimina uno que se acaba de agregar... add_elem(\\\"00005000\\\") tiempo de espera 100 ms 1) nft_pipapo_remove() elimina el elemento 0000000X Luego, KASAN muestra un s\u00edmbolo. Al observar la funci\u00f3n de eliminaci\u00f3n, existe la posibilidad de que eliminemos una regla que se asigne a un elemento no desactivado. La eliminaci\u00f3n se realiza en dos pasos: primero buscamos la clave k, devolvemos el elemento que se va a eliminar y lo marcamos como inactivo en la pr\u00f3xima generaci\u00f3n. Luego, en un segundo paso, el elemento se elimina del conjunto/mapa. La funci\u00f3n _remove no funciona correctamente si tenemos m\u00e1s de un elemento que comparte la misma clave. Esto puede suceder si insertamos un elemento en un conjunto cuando el conjunto ya contiene un elemento con la misma clave, pero la asignaci\u00f3n del elemento a la clave existente ha expirado o no est\u00e1 activa en la pr\u00f3xima generaci\u00f3n. En tal caso, es posible que la eliminaci\u00f3n desasigne el elemento incorrecto. Si esto sucede, filtraremos el elemento no desactivado, se vuelve inalcanzable. El elemento que se desactiv\u00f3 (y se liberar\u00e1 m\u00e1s adelante) permanecer\u00e1 accesible en la estructura de datos establecida, lo que puede provocar un bloqueo cuando dicho elemento se recupere durante la b\u00fasqueda (puntero obsoleto). Agregue una verificaci\u00f3n de que la clave que coincide completamente de hecho se asigna al elemento que hemos marcado como inactivo en el paso de desactivaci\u00f3n. Si no, debemos seguir buscando. Agregue tambi\u00e9n una trampa de error/advertencia al final de la funci\u00f3n; la funci\u00f3n de eliminaci\u00f3n nunca debe llamarse con un elemento invisible/inalcanzable/inexistente. v2: evitar variables temporales innecesarias (Stefano)\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\",\"baseScore\":5.9,\"baseSeverity\":\"MEDIUM\"},\"exploitabilityScore\":2.2,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/14b001ba221136c15f894577253e8db535b99487\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3cfc9ec039af60dbd8965ae085b2c2ccdcfbe1cc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/41d8fdf3afaff312e17466e4ab732937738d5644\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7a1679e2d9bfa3b5f8755c2c7113e54b7d42bd46\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e3b887a9c11caf8357a821260e095f2a694a34f2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ebf7c9746f073035ee26209e38c3a1170f7b349a\",\"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...