CVE-2024-57947 (GCVE-0-2024-57947)
Vulnerability from cvelistv5
Published
2025-01-23 13:54
Modified
2026-08-05 11:47
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_set_pipapo: fix initial map fill The initial buffer has to be inited to all-ones, but it must restrict it to the size of the first field, not the total field size. After each round in the map search step, the result and the fill map are swapped, so if we have a set where f->bsize of the first element is smaller than m->bsize_max, those one-bits are leaked into future rounds result map. This makes pipapo find an incorrect matching results for sets where first field size is not the largest. Followup patch adds a test case to nft_concat_range.sh selftest script. Thanks to Stefano Brivio for pointing out that we need to zero out the remainder explicitly, only correcting memset() argument isn't enough.
Impacted products
Vendor Product Version
Linux Linux Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Version: 3c4287f62044a90e73a561aa05fc46e62da173da
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/netfilter/nft_set_pipapo.c",
            "net/netfilter/nft_set_pipapo.h",
            "net/netfilter/nft_set_pipapo_avx2.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            },
            {
              "lessThan": "957a4d1c4c5849e4515c9fb4db21bf85318103dc",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            },
            {
              "lessThan": "9625c46ce6fd4f922595a4b32b1de5066d70464f",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            },
            {
              "lessThan": "69b6a67f7052905e928d75a0c5871de50e686986",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            },
            {
              "lessThan": "8058c88ac0df21239daee54b5934d5c80ca9685f",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            },
            {
              "lessThan": "791a615b7ad2258c560f91852be54b0480837c93",
              "status": "affected",
              "version": "3c4287f62044a90e73a561aa05fc46e62da173da",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/netfilter/nft_set_pipapo.c",
            "net/netfilter/nft_set_pipapo.h",
            "net/netfilter/nft_set_pipapo_avx2.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": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.247",
              "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"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.247",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.165",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.103",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.44",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10.3",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_set_pipapo: fix initial map fill\n\nThe initial buffer has to be inited to all-ones, but it must restrict\nit to the size of the first field, not the total field size.\n\nAfter each round in the map search step, the result and the fill map\nare swapped, so if we have a set where f-\u003ebsize of the first element\nis smaller than m-\u003ebsize_max, those one-bits are leaked into future\nrounds result map.\n\nThis makes pipapo find an incorrect matching results for sets where\nfirst field size is not the largest.\n\nFollowup patch adds a test case to nft_concat_range.sh selftest script.\n\nThanks to Stefano Brivio for pointing out that we need to zero out\nthe remainder explicitly, only correcting memset() argument isn\u0027t enough."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The buggy `nft_pipapo_lookup()` is the per-packet set-matching op invoked from `nft_lookup_eval` on header fields (`ip saddr . tcp dport . meta l4proto`) taken directly from received packets, so a remote off-host attacker\u0027s traffic drives the defective classification. The generic C path is what runs on all non-x86_64 firewall/router deployments and on x86_64 via the `!irq_fpu_usable()` fallback.\nAC:L - Once a ruleset uses the common concat-range set layout where the first field expands to fewer rules than a later field, the wrong-match behavior is fully deterministic and repeatable \u2014 the attacker simply sends packets and can probe which header values are falsely accepted. No race, no memory-layout dependency, no unknown runtime state.\nPR:N - An unauthenticated, unprivileged remote host needs only to emit packets at the filtering system to reach the miscomputed lookup; no account, credential, or capability on the target is involved. (The control-plane variant via `pipapo_get()` needs only CAP_NET_ADMIN, itself obtainable unprivileged through `unshare -Urn`.)\nUI:N - Classification happens automatically in the packet path for every frame traversing the affected rule; no administrator or victim action is needed for the attacker\u0027s traffic to be misclassified.\nS:U - The defect and its consequences are contained in the kernel\u0027s netfilter/nf_tables engine within a single security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The flaw defeats the packet filter itself: a source address/port/protocol tuple that policy denies falsely matches an allow-set entry, granting an unauthenticated remote attacker reach to services (management ports, databases, internal listeners) whose data the ruleset was configured to keep unreachable, and `map` sets can steer traffic to an unintended internal destination.\nI:H - The kernel silently enforces a falsified classification result, accepting traffic that must be dropped, and on the control plane `pipapo_get()` makes `nft get/add/delete element` operate on the wrong element, so a delete removes an unrelated entry and the enforced security policy is corrupted without any error being reported.\nA:H - The same systematic false-positive makes permitted traffic match drop/reject entries, persistently blackholing legitimate flows, while insert returning spurious `-EEXIST`/`-ENOTEMPTY` and deletes hitting the wrong element leave the administrator unable to repair the ruleset \u2014 a sustained loss of filtering and connectivity for the affected services."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:47:01.966Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9"
        },
        {
          "url": "https://git.kernel.org/stable/c/957a4d1c4c5849e4515c9fb4db21bf85318103dc"
        },
        {
          "url": "https://git.kernel.org/stable/c/9625c46ce6fd4f922595a4b32b1de5066d70464f"
        },
        {
          "url": "https://git.kernel.org/stable/c/69b6a67f7052905e928d75a0c5871de50e686986"
        },
        {
          "url": "https://git.kernel.org/stable/c/8058c88ac0df21239daee54b5934d5c80ca9685f"
        },
        {
          "url": "https://git.kernel.org/stable/c/791a615b7ad2258c560f91852be54b0480837c93"
        }
      ],
      "title": "netfilter: nf_set_pipapo: fix initial map fill",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-57947",
    "datePublished": "2025-01-23T13:54:20.267Z",
    "dateReserved": "2025-01-19T11:50:08.380Z",
    "dateUpdated": "2026-08-05T11:47:01.966Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…