Skip to content
Heist/ feed
Back to feed
UnratedFix available

bpf: prevent leak of lsm program after failed attach

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: bpf: prevent leak of lsm program after failed attach In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/20220628174314.1216643-4-sdf@google.com/

Products
Kernel
Affected versions
Not specified
Fixed versions
6.0.16, 6.1.2
CVEs
CVE-2022-50855
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:05 UTC · Revision 1

Source evidence

bpf: prevent leak of lsm program after failed attach

core-osv · Original source

Published 30 Dec 2025, 12:15 UTC

In the Linux kernel, the following vulnerability has been resolved: bpf: prevent leak of lsm program after failed attach In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/20220628174314.1216643-4-sdf@google.com/

osv:CVE-2022-50855

Kernel

Fixed versions: 6.0.16, 6.1.2

Complete source record
{
  "id": "73b10263d6d0a13ee6fb55bfcd242cfce88360e0ee8b371ebcec4b6ccb6b858c",
  "url": "https://osv.dev/vulnerability/CVE-2022-50855",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: prevent leak of lsm program after failed attach",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: prevent leak of lsm program after failed attach In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/20220628174314.1216643-4-sdf@google.com/",
    "evidence": "osv:CVE-2022-50855",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.0.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-50855",
      "aliases": [
        "CVE-2022-50855"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e"
                },
                {
                  "fixed": "82b39df5ddb298daaf6dc504032ff7eb027fa106"
                },
                {
                  "fixed": "6a1504dd36cd9a0a69250d61da8bdb17b29f1fe8"
                },
                {
                  "fixed": "e89f3edffb860a0f54a9ed16deadb7a4a1fa3862"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50855.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.0.0"
                },
                {
                  "fixed": "6.0.16"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.1.0"
                },
                {
                  "fixed": "6.1.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50855.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.536292711Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/6a1504dd36cd9a0a69250d61da8bdb17b29f1fe8",
        "https://git.kernel.org/stable/c/82b39df5ddb298daaf6dc504032ff7eb027fa106",
        "https://git.kernel.org/stable/c/e89f3edffb860a0f54a9ed16deadb7a4a1fa3862",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50855.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50855",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50855.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50855",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 494379,
  "published_at": "2025-12-30T12:15:30.481+00:00"
}