Skip to content
Heist/ feed
Back to feed
HighFix available

apparmor: fix use-after-free in rawdata dedup loop

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: apparmor: fix use-after-free in rawdata dedup loop aa_replace_profiles() walks ns->rawdata_list to dedup the incoming policy blob against entries already attached to existing profiles. Per the kernel-doc on struct aa_loaddata, list membership does not hold a reference: profiles hold pcount, and when the last pcount drops, do_ploaddata_rmfs() is queued on a workqueue that takes ns->lock and removes the entry. Between dropping the last pcount and the workqueue running, an entry remains on the list with pcount == 0. aa_get_profile_loaddata() is an unconditional kref_get() on pcount, so when the dedup loop hits such an entry, refcount hardening reports refcount_t: addition on 0; use-after-free. inside aa_replace_profiles(), and the poisoned counter then trips "saturated" and "underflow" warnings on the subsequent uses of the same loaddata. Before commit a0b7091c4de4 ("apparmor: fix race on rawdata dereference") the dedup path used a get_unless_zero-style helper on a single counter, so the existing "if (tmp)" guard was meaningful. The split-refcount refactor introduced aa_get_profile_loaddata(), which has plain kref_get() semantics, and the guard quietly became a no-op. Introduce aa_get_profile_loaddata_not0(), matching the existing _not0 convention used by aa_get_profile_not0(), and use it for the rawdata_list dedup lookup so dying entries are skipped. Reproduced on x86_64 with v7.1-rc5 in QEMU+KVM running Ubuntu

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.261, 5.15.212, 6.1.177, 6.12.95, 6.18.38, 6.6.144, 7.1.3
CVEs
CVE-2026-63827
Confirmed fixed CVEs
Not specified
Updated in this feed
28 Oct 2026, 13:03 UTC · Revision 1

Source evidence

apparmor: fix use-after-free in rawdata dedup loop

core-osv · Original source

Published 19 Jul 2026, 12:02 UTC

In the Linux kernel, the following vulnerability has been resolved: apparmor: fix use-after-free in rawdata dedup loop aa_replace_profiles() walks ns->rawdata_list to dedup the incoming policy blob against entries already attached to existing profiles. Per the kernel-doc on struct aa_loaddata, list membership does not hold a reference: profiles hold pcount, and when the last pcount drops, do_ploaddata_rmfs() is queued on a workqueue that takes ns->lock and removes the entry. Between dropping the last pcount and the workqueue running, an entry remains on the list with pcount == 0. aa_get_profile_loaddata() is an unconditional kref_get() on pcount, so when the dedup loop hits such an entry, refcount hardening reports refcount_t: addition on 0; use-after-free. inside aa_replace_profiles(), and the poisoned counter then trips "saturated" and "underflow" warnings on the subsequent uses of the same loaddata. Before commit a0b7091c4de4 ("apparmor: fix race on rawdata dereference") the dedup path used a get_unless_zero-style helper on a single counter, so the existing "if (tmp)" guard was meaningful. The split-refcount refactor introduced aa_get_profile_loaddata(), which has plain kref_get() semantics, and the guard quietly became a no-op. Introduce aa_get_profile_loaddata_not0(), matching the existing _not0 convention used by aa_get_profile_not0(), and use it for the rawdata_list dedup lookup so dying entries are skipped. Reproduced on x86_64 with v7.1-rc5 in QEMU+KVM running Ubuntu

osv:CVE-2026-63827

Kernel

Fixed versions: 5.10.261, 5.15.212, 6.1.177, 6.6.144, 6.12.95, 6.18.38, 7.1.3

Complete source record
{
  "id": "6c0cc1f8efa0378e15ce09e5771f4f1ead24d632b7ada7d6705e9e08daa2c95c",
  "url": "https://osv.dev/vulnerability/CVE-2026-63827",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "apparmor: fix use-after-free in rawdata dedup loop",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: apparmor: fix use-after-free in rawdata dedup loop aa_replace_profiles() walks ns->rawdata_list to dedup the incoming policy blob against entries already attached to existing profiles. Per the kernel-doc on struct aa_loaddata, list membership does not hold a reference: profiles hold pcount, and when the last pcount drops, do_ploaddata_rmfs() is queued on a workqueue that takes ns->lock and removes the entry. Between dropping the last pcount and the workqueue running, an entry remains on the list with pcount == 0. aa_get_profile_loaddata() is an unconditional kref_get() on pcount, so when the dedup loop hits such an entry, refcount hardening reports refcount_t: addition on 0; use-after-free. inside aa_replace_profiles(), and the poisoned counter then trips \"saturated\" and \"underflow\" warnings on the subsequent uses of the same loaddata. Before commit a0b7091c4de4 (\"apparmor: fix race on rawdata dereference\") the dedup path used a get_unless_zero-style helper on a single counter, so the existing \"if (tmp)\" guard was meaningful. The split-refcount refactor introduced aa_get_profile_loaddata(), which has plain kref_get() semantics, and the guard quietly became a no-op. Introduce aa_get_profile_loaddata_not0(), matching the existing _not0 convention used by aa_get_profile_not0(), and use it for the rawdata_list dedup lookup so dying entries are skipped. Reproduced on x86_64 with v7.1-rc5 in QEMU+KVM running Ubuntu",
    "evidence": "osv:CVE-2026-63827",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.261",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.212",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.177",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.144",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.95",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.38",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.1.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-63827",
      "aliases": [
        "CVE-2026-63827"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3b8e77c7abab40e6de9ad9de730d77984a498840"
                },
                {
                  "fixed": "643221da57dbb1a8fd800610331cf1ec27969f71"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d9d8560b9b7932f8cffc4c068c14289220900f79"
                },
                {
                  "fixed": "b17f0c59cc1525765625cf07d0391b7f9c1ed7e5"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6b6ba87579c7e7c669e0bec91823e7fb693bc5df"
                },
                {
                  "fixed": "a7a2890028f16e5b0af0bb005d80fcb32559cca3"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6ef1f2926c41ab96952d9696d55a052f1b3a9418"
                },
                {
                  "fixed": "15fd83a1e42ede15070968806bb6c8b1a5170688"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f9761add6d100962a23996cb68f3d6abdd4d1815"
                },
                {
                  "fixed": "ce261a20b41db522e320a41bbf1292bf85af66df"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "af782cc8871e3683ddd5a3cd2f7df526599863a9"
                },
                {
                  "fixed": "c3ca2631073b2cef06824fd2bfc452ff7a1023de"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a0b7091c4de45a7325c8780e6934a894f92ac86b"
                },
                {
                  "fixed": "5e34fa9f6f7cd688ae153fff13139a5cf2d42339"
                },
                {
                  "fixed": "6f060496d03e4dc560a40f73770bd08335cb7a27"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.10.253"
                },
                {
                  "fixed": "5.10.261"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.203"
                },
                {
                  "fixed": "5.15.212"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.1.169"
                },
                {
                  "fixed": "6.1.177"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.6.130"
                },
                {
                  "fixed": "6.6.144"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.12.77"
                },
                {
                  "fixed": "6.12.95"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.18.18"
                },
                {
                  "fixed": "6.18.38"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.19.8"
                },
                {
                  "fixed": "6.20"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "763e838adc3c7ec5a7df2990ce84cad951e42721"
                }
              ]
            }
          ],
          "versions": [
            "v5.10.260",
            "v5.10.259",
            "v5.10.258",
            "v5.10.257",
            "v5.10.256",
            "v5.10.255",
            "v5.10.254",
            "v5.10.253",
            "v5.15.211",
            "v5.15.210",
            "v5.15.209",
            "v5.15.208",
            "v5.15.207",
            "v5.15.206",
            "v5.15.205",
            "v5.15.204",
            "v5.15.203",
            "v6.1.176",
            "v6.1.175",
            "v6.1.174",
            "v6.1.173",
            "v6.1.172",
            "v6.1.171",
            "v6.1.170",
            "v6.1.169",
            "v6.6.143",
            "v6.6.142",
            "v6.6.141",
            "v6.6.140",
            "v6.6.139",
            "v6.6.138",
            "v6.6.137",
            "v6.6.136",
            "v6.6.135",
            "v6.6.134",
            "v6.6.133",
            "v6.6.132",
            "v6.6.131",
            "v6.6.130",
            "v6.12.94",
            "v6.12.93",
            "v6.12.92",
            "v6.12.91",
            "v6.12.90",
            "v6.12.89",
            "v6.12.88",
            "v6.12.87",
            "v6.12.86",
            "v6.12.85",
            "v6.12.84",
            "v6.12.83",
            "v6.12.82",
            "v6.12.81",
            "v6.12.80",
            "v6.12.79",
            "v6.12.78",
            "v6.12.77",
            "v6.18.37",
            "v6.18.36",
            "v6.18.35",
            "v6.18.34",
            "v6.18.33",
            "v6.18.32",
            "v6.18.31",
            "v6.18.30",
            "v6.18.29",
            "v6.18.28",
            "v6.18.27",
            "v6.18.26",
            "v6.18.25",
            "v6.18.24",
            "v6.18.23",
            "v6.18.22",
            "v6.18.21",
            "v6.18.20",
            "v6.18.19",
            "v6.18.18",
            "v6.19.14",
            "v6.19.13",
            "v6.19.12",
            "v6.19.11",
            "v6.19.10",
            "v6.19.9",
            "v6.19.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63827.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.10.261"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.212"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.177"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.144"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.95"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.38"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.1.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-63827.json"
          }
        }
      ],
      "modified": "2026-10-09T18:26:42.611584023Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/15fd83a1e42ede15070968806bb6c8b1a5170688",
        "https://git.kernel.org/stable/c/5e34fa9f6f7cd688ae153fff13139a5cf2d42339",
        "https://git.kernel.org/stable/c/643221da57dbb1a8fd800610331cf1ec27969f71",
        "https://git.kernel.org/stable/c/6f060496d03e4dc560a40f73770bd08335cb7a27",
        "https://git.kernel.org/stable/c/a7a2890028f16e5b0af0bb005d80fcb32559cca3",
        "https://git.kernel.org/stable/c/b17f0c59cc1525765625cf07d0391b7f9c1ed7e5",
        "https://git.kernel.org/stable/c/c3ca2631073b2cef06824fd2bfc452ff7a1023de",
        "https://git.kernel.org/stable/c/ce261a20b41db522e320a41bbf1292bf85af66df",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63827.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-63827",
        "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/2026/63xxx/CVE-2026-63827.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-63827",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 124083,
  "published_at": "2026-07-19T12:02:22.083+00:00"
}