GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2022-50860 (GCVE-0-2022-50860)

Vulnerability from cvelistv5 – Published: 2025-12-30 12:15 – Updated: 2026-08-05 08:59
VLAI
Title
apparmor: Fix memleak in alloc_ns()
Summary
In the Linux kernel, the following vulnerability has been resolved: apparmor: Fix memleak in alloc_ns() After changes in commit a1bd627b46d1 ("apparmor: share profile name on replacement"), the hname member of struct aa_policy is not valid slab object, but a subset of that, it can not be freed by kfree_sensitive(), use aa_policy_destroy() to fix it.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: a1bd627b46d169268a0ee5960899fb5be960a317 , < 9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3 (git)
Affected: a1bd627b46d169268a0ee5960899fb5be960a317 , < 5f509fa740b17307f0cba412485072f632d5af36 (git)
Affected: a1bd627b46d169268a0ee5960899fb5be960a317 , < 0250cf8d37bb5201a117177afd24dc73a1c81657 (git)
Affected: a1bd627b46d169268a0ee5960899fb5be960a317 , < 12695b4b76d437b9c0182a6f7dfb2248013a9daf (git)
Affected: a1bd627b46d169268a0ee5960899fb5be960a317 , < e9e6fa49dbab6d84c676666f3fe7d360497fd65b (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.13
Unaffected: 0 , < 4.13 (semver)
Unaffected: 5.10.163 , ≤ 5.10.* (semver)
Unaffected: 5.15.86 , ≤ 5.15.* (semver)
Unaffected: 6.0.16 , ≤ 6.0.* (semver)
Unaffected: 6.1.2 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "security/apparmor/policy_ns.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3",
              "status": "affected",
              "version": "a1bd627b46d169268a0ee5960899fb5be960a317",
              "versionType": "git"
            },
            {
              "lessThan": "5f509fa740b17307f0cba412485072f632d5af36",
              "status": "affected",
              "version": "a1bd627b46d169268a0ee5960899fb5be960a317",
              "versionType": "git"
            },
            {
              "lessThan": "0250cf8d37bb5201a117177afd24dc73a1c81657",
              "status": "affected",
              "version": "a1bd627b46d169268a0ee5960899fb5be960a317",
              "versionType": "git"
            },
            {
              "lessThan": "12695b4b76d437b9c0182a6f7dfb2248013a9daf",
              "status": "affected",
              "version": "a1bd627b46d169268a0ee5960899fb5be960a317",
              "versionType": "git"
            },
            {
              "lessThan": "e9e6fa49dbab6d84c676666f3fe7d360497fd65b",
              "status": "affected",
              "version": "a1bd627b46d169268a0ee5960899fb5be960a317",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "security/apparmor/policy_ns.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.13"
            },
            {
              "lessThan": "4.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: Fix memleak in alloc_ns()\n\nAfter changes in commit a1bd627b46d1 (\"apparmor: share profile name on\nreplacement\"), the hname member of struct aa_policy is not valid slab\nobject, but a subset of that, it can not be freed by kfree_sensitive(),\nuse aa_policy_destroy() to fix it."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - Reachable only via local AppArmor policy interfaces\u2014mkdir on apparmorfs namespaces or write to .load/.replace\u2014which call alloc_ns through __aa_create_ns/aa_prepare_ns; not via network or adjacent packet paths.\nAC:L - An attacker who can create namespaces can induce GFP_KERNEL failure in alloc_unconfined (e.g. memory pressure/cgroup limits) after aa_policy_init succeeds; once on fail_unconfined the bad kfree_sensitive is deterministic with no race outside attacker control.\nPR:L - Namespace creation requires CAP_MAC_ADMIN via aa_may_manage_policy, but with default unprivileged_userns_apparmor_policy=1 this is obtainable in nested user/AppArmor namespaces (e.g. unprivileged containers), matching prior AppArmor policy-load scoring.\nUI:N - The attacker triggers ns creation and the allocation-failure path themselves through policy admin operations; no separate victim action is required.\nS:U - Impact is confined to host-kernel slab corruption in AppArmor under the same OS security authority, with no VM, IOMMU, or sandbox boundary crossed.\nC:H - kfree_sensitive on the interior hname pointer performs an out-of-bounds zero (ksize returns the full slab object size from a mid-object pointer) and an invalid free, yielding slab corruption that can be leveraged for arbitrary read primitives.\nI:H - The same path is an out-of-bounds write via memzero_explicit plus an invalid free of a non-object-start pointer, which corrupts SLUB freelist metadata and is a well-established route to arbitrary write and control-flow hijack.\nA:H - Invalid free and adjacent-object corruption reliably cause kernel oops/BUG/panic under freelist hardening or subsequent realloc use, which is Availability High under kernel CVSS guidance."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:59:49.893Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3"
        },
        {
          "url": "https://git.kernel.org/stable/c/5f509fa740b17307f0cba412485072f632d5af36"
        },
        {
          "url": "https://git.kernel.org/stable/c/0250cf8d37bb5201a117177afd24dc73a1c81657"
        },
        {
          "url": "https://git.kernel.org/stable/c/12695b4b76d437b9c0182a6f7dfb2248013a9daf"
        },
        {
          "url": "https://git.kernel.org/stable/c/e9e6fa49dbab6d84c676666f3fe7d360497fd65b"
        }
      ],
      "title": "apparmor: Fix memleak in alloc_ns()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50860",
    "datePublished": "2025-12-30T12:15:33.859Z",
    "dateReserved": "2025-12-30T12:06:07.135Z",
    "dateUpdated": "2026-08-05T08:59:49.893Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50860",
      "date": "2026-09-14",
      "epss": "0.00195",
      "percentile": "0.09353"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50860\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-30T13:16:00.787\",\"lastModified\":\"2026-08-04T10:18:24.577\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\napparmor: Fix memleak in alloc_ns()\\n\\nAfter changes in commit a1bd627b46d1 (\\\"apparmor: share profile name on\\nreplacement\\\"), the hname member of struct aa_policy is not valid slab\\nobject, but a subset of that, it can not be freed by kfree_sensitive(),\\nuse aa_policy_destroy() to fix it.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"security/apparmor/policy_ns.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"a1bd627b46d169268a0ee5960899fb5be960a317\",\"lessThan\":\"9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a1bd627b46d169268a0ee5960899fb5be960a317\",\"lessThan\":\"5f509fa740b17307f0cba412485072f632d5af36\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a1bd627b46d169268a0ee5960899fb5be960a317\",\"lessThan\":\"0250cf8d37bb5201a117177afd24dc73a1c81657\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a1bd627b46d169268a0ee5960899fb5be960a317\",\"lessThan\":\"12695b4b76d437b9c0182a6f7dfb2248013a9daf\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"a1bd627b46d169268a0ee5960899fb5be960a317\",\"lessThan\":\"e9e6fa49dbab6d84c676666f3fe7d360497fd65b\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"security/apparmor/policy_ns.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4.13\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.13\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.10.163\",\"lessThanOrEqual\":\"5.10.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.86\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0.16\",\"lessThanOrEqual\":\"6.0.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.2\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0250cf8d37bb5201a117177afd24dc73a1c81657\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/12695b4b76d437b9c0182a6f7dfb2248013a9daf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5f509fa740b17307f0cba412485072f632d5af36\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9a32aa87a25d800b2c6f47bc2749a7bfd9a486f3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e9e6fa49dbab6d84c676666f3fe7d360497fd65b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-08-21T11:43:31+00:00",
      "cve": "CVE-2022-50860",
      "id": "CVE-2022-50860",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel AppArmor: Denial of Service via memory leak",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50860.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-31T01:20:24Z",
      "cve": "CVE-2022-50860",
      "id": "CVE-2022-50860",
      "initial_release_date": "2025-12-31T00:31:05Z",
      "product_status:known_affected": "427",
      "product_status:known_not_affected": "359",
      "product_status:recommended": "196",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-50860",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2022-50860.json",
      "version": "24"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…