CVE-2025-38168 (GCVE-0-2025-38168)

Vulnerability from cvelistv5 – Published: 2025-07-03 08:36 – Updated: 2026-08-05 12:00
VLAI
Title
perf: arm-ni: Unregister PMUs on probe failure
Summary
In the Linux kernel, the following vulnerability has been resolved: perf: arm-ni: Unregister PMUs on probe failure When a resource allocation fails in one clock domain of an NI device, we need to properly roll back all previously registered perf PMUs in other clock domains of the same device. Otherwise, it can lead to kernel panics. Calling arm_ni_init+0x0/0xff8 [arm_ni] @ 2374 arm-ni ARMHCB70:00: Failed to request PMU region 0x1f3c13000 arm-ni ARMHCB70:00: probe with driver arm-ni failed with error -16 list_add corruption: next->prev should be prev (fffffd01e9698a18), but was 0000000000000000. (next=ffff10001a0decc8). pstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : list_add_valid_or_report+0x7c/0xb8 lr : list_add_valid_or_report+0x7c/0xb8 Call trace: __list_add_valid_or_report+0x7c/0xb8 perf_pmu_register+0x22c/0x3a0 arm_ni_probe+0x554/0x70c [arm_ni] platform_probe+0x70/0xe8 really_probe+0xc6/0x4d8 driver_probe_device+0x48/0x170 __driver_attach+0x8e/0x1c0 bus_for_each_dev+0x64/0xf0 driver_add+0x138/0x260 bus_add_driver+0x68/0x138 __platform_driver_register+0x2c/0x40 arm_ni_init+0x14/0x2a [arm_ni] do_init_module+0x36/0x298 ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops - BUG: Fatal exception SMP: stopping secondary CPUs
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 4d5a7680f2b4d0c2955e1d9f9a594b050d637436 , < 7e958e116e3be05a1f869b5a885fc5d674c7725f (git)
Affected: 4d5a7680f2b4d0c2955e1d9f9a594b050d637436 , < 72caf9886e9c1731cf7bfe3eabc308b9268b21d6 (git)
Affected: 4d5a7680f2b4d0c2955e1d9f9a594b050d637436 , < 7f57afde6a44d9e044885e1125034edd4fda02e8 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.12
Unaffected: 0 , < 6.12 (semver)
Unaffected: 6.12.34 , ≤ 6.12.* (semver)
Unaffected: 6.15.3 , ≤ 6.15.* (semver)
Unaffected: 6.16 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/perf/arm-ni.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7e958e116e3be05a1f869b5a885fc5d674c7725f",
              "status": "affected",
              "version": "4d5a7680f2b4d0c2955e1d9f9a594b050d637436",
              "versionType": "git"
            },
            {
              "lessThan": "72caf9886e9c1731cf7bfe3eabc308b9268b21d6",
              "status": "affected",
              "version": "4d5a7680f2b4d0c2955e1d9f9a594b050d637436",
              "versionType": "git"
            },
            {
              "lessThan": "7f57afde6a44d9e044885e1125034edd4fda02e8",
              "status": "affected",
              "version": "4d5a7680f2b4d0c2955e1d9f9a594b050d637436",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/perf/arm-ni.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.12"
            },
            {
              "lessThan": "6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.34",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.34",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.3",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf: arm-ni: Unregister PMUs on probe failure\n\nWhen a resource allocation fails in one clock domain of an NI device,\nwe need to properly roll back all previously registered perf PMUs in\nother clock domains of the same device.\n\nOtherwise, it can lead to kernel panics.\n\nCalling arm_ni_init+0x0/0xff8 [arm_ni] @ 2374\narm-ni ARMHCB70:00: Failed to request PMU region 0x1f3c13000\narm-ni ARMHCB70:00: probe with driver arm-ni failed with error -16\nlist_add corruption: next-\u003eprev should be prev (fffffd01e9698a18),\nbut was 0000000000000000. (next=ffff10001a0decc8).\npstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)\npc : list_add_valid_or_report+0x7c/0xb8\nlr : list_add_valid_or_report+0x7c/0xb8\nCall trace:\n __list_add_valid_or_report+0x7c/0xb8\n perf_pmu_register+0x22c/0x3a0\n arm_ni_probe+0x554/0x70c [arm_ni]\n platform_probe+0x70/0xe8\n really_probe+0xc6/0x4d8\n driver_probe_device+0x48/0x170\n __driver_attach+0x8e/0x1c0\n bus_for_each_dev+0x64/0xf0\n driver_add+0x138/0x260\n bus_add_driver+0x68/0x138\n __platform_driver_register+0x2c/0x40\n arm_ni_init+0x14/0x2a [arm_ni]\n do_init_module+0x36/0x298\n---[ end trace 0000000000000000 ]---\nKernel panic - not syncing: Oops - BUG: Fatal exception\nSMP: stopping secondary CPUs"
        }
      ],
      "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 - The vulnerability is in an arm64 platform PMU driver\u0027s probe path and the resulting dangling `struct pmu` is exercised through local interfaces \u2014 `perf_event_open(2)` and `/sys/bus/event_source/devices/` \u2014 with no network or remote-peer input involved. Physical access is not required since the driver binds from firmware-described ACPI/DT platform devices.\nAC:L - On an affected system the probe failure is deterministic and repeatable (the overlapping PMU region fails identically on every load), and the resulting dangling PMU persists in the global `pmus` list, so the attacker\u0027s follow-on `perf_event_open()`/sysfs access is fully under their control and can be retried indefinitely to win any heap-reallocation attempt.\nPR:L - The dangling-PMU state is created by the kernel itself during boot-time probe with no attacker involvement, and reaching the freed object afterwards requires only an unprivileged local account \u2014 `perf_event_open()` walks the `pmus` list before any `perf_event_paranoid` check, and the PMU sysfs attributes are world-readable at mode 0444.\nUI:N - No victim action is needed; the vulnerable state arises automatically when the driver probes at boot or on module autoload, and the attacker triggers the use-after-free with a plain syscall or sysfs read.\nS:U - The freed memory, the corrupted list, and the hijackable function pointers are all kernel-resident, so the impact stays within the kernel\u0027s own security authority with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The registered PMUs outlive the `devm_kzalloc()`\u0027d `struct arm_ni` that embeds them, so the world-readable `arm_ni_cpumask_show`/format/identifier attributes dereference freed slab memory via `pmu_to_cd()`/`cd_to_ni()`, disclosing whatever data has since been reallocated into that chunk.\nI:H - This is a use-after-free on a `struct pmu` whose ops table is invoked from `perf_init_event()` \u2014 spraying the reclaimed devres allocation gives an attacker-controlled `pmu-\u003eevent_init` indirect call and thus kernel control-flow hijack, and the stale `list_head` additionally causes writes through a freed pointer.\nA:H - The commit message documents the actual observed result: `list_add` corruption in `perf_pmu_register()` leading to `Kernel panic - not syncing: Oops - BUG: Fatal exception` with secondary CPUs stopped, a complete system denial of service."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:00:00.949Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7e958e116e3be05a1f869b5a885fc5d674c7725f"
        },
        {
          "url": "https://git.kernel.org/stable/c/72caf9886e9c1731cf7bfe3eabc308b9268b21d6"
        },
        {
          "url": "https://git.kernel.org/stable/c/7f57afde6a44d9e044885e1125034edd4fda02e8"
        }
      ],
      "title": "perf: arm-ni: Unregister PMUs on probe failure",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38168",
    "datePublished": "2025-07-03T08:36:07.620Z",
    "dateReserved": "2025-04-16T04:51:23.991Z",
    "dateUpdated": "2026-08-05T12:00:00.949Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-38168",
      "date": "2026-08-19",
      "epss": "0.00147",
      "percentile": "0.04443"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38168\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-03T09:15:32.377\",\"lastModified\":\"2026-07-30T06:22:56.593\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nperf: arm-ni: Unregister PMUs on probe failure\\n\\nWhen a resource allocation fails in one clock domain of an NI device,\\nwe need to properly roll back all previously registered perf PMUs in\\nother clock domains of the same device.\\n\\nOtherwise, it can lead to kernel panics.\\n\\nCalling arm_ni_init+0x0/0xff8 [arm_ni] @ 2374\\narm-ni ARMHCB70:00: Failed to request PMU region 0x1f3c13000\\narm-ni ARMHCB70:00: probe with driver arm-ni failed with error -16\\nlist_add corruption: next-\u003eprev should be prev (fffffd01e9698a18),\\nbut was 0000000000000000. (next=ffff10001a0decc8).\\npstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)\\npc : list_add_valid_or_report+0x7c/0xb8\\nlr : list_add_valid_or_report+0x7c/0xb8\\nCall trace:\\n __list_add_valid_or_report+0x7c/0xb8\\n perf_pmu_register+0x22c/0x3a0\\n arm_ni_probe+0x554/0x70c [arm_ni]\\n platform_probe+0x70/0xe8\\n really_probe+0xc6/0x4d8\\n driver_probe_device+0x48/0x170\\n __driver_attach+0x8e/0x1c0\\n bus_for_each_dev+0x64/0xf0\\n driver_add+0x138/0x260\\n bus_add_driver+0x68/0x138\\n __platform_driver_register+0x2c/0x40\\n arm_ni_init+0x14/0x2a [arm_ni]\\n do_init_module+0x36/0x298\\n---[ end trace 0000000000000000 ]---\\nKernel panic - not syncing: Oops - BUG: Fatal exception\\nSMP: stopping secondary CPUs\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: perf: arm-ni: Anular el registro de las PMU en caso de fallo de la sonda. Cuando falla la asignaci\u00f3n de recursos en un dominio de reloj de un dispositivo NI, es necesario revertir correctamente todas las PMU de perf registradas previamente en otros dominios de reloj del mismo dispositivo. De lo contrario, puede provocar p\u00e1nicos del kernel. Llamada a arm_ni_init+0x0/0xff8 [arm_ni] a 2374 arm-ni ARMHCB70:00: Error al solicitar la regi\u00f3n de PMU 0x1f3c13000 arm-ni ARMHCB70:00: La sonda con el controlador arm-ni fall\u00f3 con el error -16. Corrupci\u00f3n de list_add: next-\u0026gt;prev deber\u00eda ser prev (ffffffd01e9698a18), pero era 0000000000000000. (next=ffff10001a0decc8). pstate: 6340009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : list_add_valid_or_report+0x7c/0xb8 lr : list_add_valid_or_report+0x7c/0xb8 Call trace: __list_add_valid_or_report+0x7c/0xb8 perf_pmu_register+0x22c/0x3a0 arm_ni_probe+0x554/0x70c [arm_ni] platform_probe+0x70/0xe8 really_probe+0xc6/0x4d8 driver_probe_device+0x48/0x170 __driver_attach+0x8e/0x1c0 bus_for_each_dev+0x64/0xf0 driver_add+0x138/0x260 bus_add_driver+0x68/0x138 __platform_driver_register+0x2c/0x40 arm_ni_init+0x14/0x2a [arm_ni] do_init_module+0x36/0x298 ---[ fin de seguimiento 000000000000000 ]--- P\u00e1nico del kernel - no sincroniza: Ups - ERROR: Excepci\u00f3n fatal SMP: deteniendo las CPU secundarias\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/perf/arm-ni.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4d5a7680f2b4d0c2955e1d9f9a594b050d637436\",\"lessThan\":\"7e958e116e3be05a1f869b5a885fc5d674c7725f\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"4d5a7680f2b4d0c2955e1d9f9a594b050d637436\",\"lessThan\":\"72caf9886e9c1731cf7bfe3eabc308b9268b21d6\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"4d5a7680f2b4d0c2955e1d9f9a594b050d637436\",\"lessThan\":\"7f57afde6a44d9e044885e1125034edd4fda02e8\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/perf/arm-ni.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.12\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.12\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.34\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.15.3\",\"lessThanOrEqual\":\"6.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16\",\"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},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.12\",\"versionEndExcluding\":\"6.12.34\",\"matchCriteriaId\":\"D349613A-2E37-4539-B97E-D97F5D92A03C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.15.3\",\"matchCriteriaId\":\"0541C761-BD5E-4C1A-8432-83B375D7EB92\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/72caf9886e9c1731cf7bfe3eabc308b9268b21d6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7e958e116e3be05a1f869b5a885fc5d674c7725f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7f57afde6a44d9e044885e1125034edd4fda02e8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-07-30T10:11:49+00:00",
      "cve": "CVE-2025-38168",
      "id": "CVE-2025-38168",
      "initial_release_date": "2025-07-03T00:00:00+00:00",
      "product_status:known_affected": "184",
      "product_status:known_not_affected": "90",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel: Local denial of service in arm-ni due to improper PMU unregistration",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-38168.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T01:12:38Z",
      "cve": "CVE-2025-38168",
      "id": "CVE-2025-38168",
      "initial_release_date": "2025-07-04T14:37:53Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "5",
      "product_status:known_not_affected": "448",
      "product_status:recommended": "154",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-38168",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-38168.json",
      "version": "29"
    }
  }
}



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…