CVE-2025-22110 (GCVE-0-2025-22110)
Vulnerability from cvelistv5
Published
2025-04-16 14:12
Modified
2026-08-05 11:56
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: netfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error It is possible that ctx in nfqnl_build_packet_message() could be used before it is properly initialize, which is only initialized by nfqnl_get_sk_secctx(). This patch corrects this problem by initializing the lsmctx to a safe value when it is declared. This is similar to the commit 35fcac7a7c25 ("audit: Initialize lsmctx to avoid memory allocation error").
Impacted products
Vendor Product Version
Linux Linux Version: 2d470c778120d3cdb8d8ab250329ca85f49f12b1
Version: 2d470c778120d3cdb8d8ab250329ca85f49f12b1
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/netfilter/nfnetlink_queue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ddbf7e1d82a1d0c1d3425931a6cb1b83f8454759",
              "status": "affected",
              "version": "2d470c778120d3cdb8d8ab250329ca85f49f12b1",
              "versionType": "git"
            },
            {
              "lessThan": "778b09d91baafb13408470c721d034d6515cfa5a",
              "status": "affected",
              "version": "2d470c778120d3cdb8d8ab250329ca85f49f12b1",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/netfilter/nfnetlink_queue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.14"
            },
            {
              "lessThan": "6.14",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.2",
                  "versionStartIncluding": "6.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "6.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error\n\nIt is possible that ctx in nfqnl_build_packet_message() could be used\nbefore it is properly initialize, which is only initialized\nby nfqnl_get_sk_secctx().\n\nThis patch corrects this problem by initializing the lsmctx to a safe\nvalue when it is declared.\n\nThis is similar to the commit 35fcac7a7c25\n(\"audit: Initialize lsmctx to avoid memory allocation error\")."
        }
      ],
      "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 uninitialized `lsm_context` is consumed in `nfqnl_build_packet_message()`, which runs in the softirq packet-receive path for every packet hitting an NFQUEUE verdict (`nf_hook_slow` \u2192 `nf_queue` \u2192 `nfqnl_enqueue_packet`). On an internet-facing host running an inline NFQUEUE-based IPS (Suricata/Snort IPS mode), remote packets alone drive the vulnerable code.\nAC:L - The uninitialized-memory use is unconditional and deterministic \u2014 it fires on every queued packet with no crafting required \u2014 and the attacker can repeat it millions of times while shaping the underlying stack through the preceding IP/conntrack/netfilter processing of their own packets.\nPR:N - In the inline-IPS deployment the remote attacker needs no credentials whatsoever; merely sending traffic to the host executes the vulnerable code. Even in the purely local model, the `NFQUEUE` rule and nfnetlink queue socket are gated only by `netlink_net_capable(CAP_NET_ADMIN)`/`ns_capable()`, which any unprivileged user obtains via `unshare -Urn`.\nUI:N - No victim action is required \u2014 the flaw triggers automatically during kernel packet processing as soon as traffic traverses the NFQUEUE rule.\nS:U - The invalid free and resulting slab corruption occur entirely within the kernel\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Uninitialized stack memory is interpreted as a pointer and length, and the resulting wild `kfree()` yields slab corruption that can be groomed into an arbitrary-read primitive, so treat as high per use-after-free/uninitialized-memory guidance.\nI:H - `selinux_release_secctx()`/`apparmor_release_secctx()` call `kfree()` on an attacker-influenceable stale stack value, giving an arbitrary-free primitive that corrupts the slab allocator and is a well-established route to arbitrary write and control-flow hijack.\nA:H - Freeing a bogus pointer triggers slab metadata corruption, `BUG_ON`/oops, or panic, and the path is reached on every queued packet so it can be driven repeatedly until the kernel dies."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:56:50.656Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ddbf7e1d82a1d0c1d3425931a6cb1b83f8454759"
        },
        {
          "url": "https://git.kernel.org/stable/c/778b09d91baafb13408470c721d034d6515cfa5a"
        }
      ],
      "title": "netfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-22110",
    "datePublished": "2025-04-16T14:12:57.061Z",
    "dateReserved": "2024-12-29T08:45:45.820Z",
    "dateUpdated": "2026-08-05T11:56:50.656Z",
    "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…