{
  "id": "CVE-2025-38162",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38162",
  "published_at": "2025-07-03T08:36:03.731Z",
  "title": "netfilter: nft_set_pipapo: prevent overflow in lookup table allocation",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nft_set_pipapo: prevent overflow in lookup table allocation\n\nWhen calculating the lookup table size, ensure the following\nmultiplication does not overflow:\n\n- desc-\u003efield_len[] maximum value is U8_MAX multiplied by\n  NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case.\n- NFT_PIPAPO_BUCKETS(f-\u003ebb) is 2^8, worst case.\n- sizeof(unsigned long), from sizeof(*f-\u003elt), lt in\n  struct nft_pipapo_field.\n\nThen, use check_mul_overflow() to multiply by bucket size and then use\ncheck_add_overflow() to the alignment for avx2 (if needed). Finally, add\nlt_size_check_overflow() helper and use it to consolidate this.\n\nWhile at it, replace leftover allocation using the GFP_KERNEL to\nGFP_KERNEL_ACCOUNT for consistency, in pipapo_resize().",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 3c4287f62044a90e73a561aa05fc46e62da173da, \u003c 91edc076439c9e2f34b176149f1c84a47a8ec32f",
          "\u003e= 3c4287f62044a90e73a561aa05fc46e62da173da, \u003c a9e757473561da93c6a4136f0e59aba91ec777fc",
          "\u003e= 3c4287f62044a90e73a561aa05fc46e62da173da, \u003c c1360ac8156c0a3f2385baef91d8d26fd9d39701",
          "\u003e= 3c4287f62044a90e73a561aa05fc46e62da173da, \u003c 43fe1181f738295624696ae9ff611790edb65b5e",
          "\u003e= 3c4287f62044a90e73a561aa05fc46e62da173da, \u003c 4c5c6aa9967dbe55bd017bb509885928d0f31206"
        ],
        "fixed_in": [
          "91edc076439c9e2f34b176149f1c84a47a8ec32f",
          "a9e757473561da93c6a4136f0e59aba91ec777fc",
          "c1360ac8156c0a3f2385baef91d8d26fd9d39701",
          "43fe1181f738295624696ae9ff611790edb65b5e",
          "4c5c6aa9967dbe55bd017bb509885928d0f31206"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.6"
        ],
        "fixed_in": [
          "0",
          "6.1.167",
          "6.6.125",
          "6.12.34",
          "6.15.3",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 91edc076439c9e2f34b176149f1c84a47a8ec32f or a9e757473561da93c6a4136f0e59aba91ec777fc or c1360ac8156c0a3f2385baef91d8d26fd9d39701 or 43fe1181f738295624696ae9ff611790edb65b5e or 4c5c6aa9967dbe55bd017bb509885928d0f31206 or later.",
      "Upgrade Linux to 0 or 6.1.167 or 6.6.125 or 6.12.34 or 6.15.3 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
