FKIE_CVE-2025-40122

Vulnerability from fkie_nvd - Published: 2025-11-12 11:15 - Updated: 2026-10-19 21:10
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: perf/x86/intel: Fix IA32_PMC_x_CFG_B MSRs access error When running perf_fuzzer on PTL, sometimes the below "unchecked MSR access error" is seen when accessing IA32_PMC_x_CFG_B MSRs. [ 55.611268] unchecked MSR access error: WRMSR to 0x1986 (tried to write 0x0000000200000001) at rIP: 0xffffffffac564b28 (native_write_msr+0x8/0x30) [ 55.611280] Call Trace: [ 55.611282] <TASK> [ 55.611284] ? intel_pmu_config_acr+0x87/0x160 [ 55.611289] intel_pmu_enable_acr+0x6d/0x80 [ 55.611291] intel_pmu_enable_event+0xce/0x460 [ 55.611293] x86_pmu_start+0x78/0xb0 [ 55.611297] x86_pmu_enable+0x218/0x3a0 [ 55.611300] ? x86_pmu_enable+0x121/0x3a0 [ 55.611302] perf_pmu_enable+0x40/0x50 [ 55.611307] ctx_resched+0x19d/0x220 [ 55.611309] __perf_install_in_context+0x284/0x2f0 [ 55.611311] ? __pfx_remote_function+0x10/0x10 [ 55.611314] remote_function+0x52/0x70 [ 55.611317] ? __pfx_remote_function+0x10/0x10 [ 55.611319] generic_exec_single+0x84/0x150 [ 55.611323] smp_call_function_single+0xc5/0x1a0 [ 55.611326] ? __pfx_remote_function+0x10/0x10 [ 55.611329] perf_install_in_context+0xd1/0x1e0 [ 55.611331] ? __pfx___perf_install_in_context+0x10/0x10 [ 55.611333] __do_sys_perf_event_open+0xa76/0x1040 [ 55.611336] __x64_sys_perf_event_open+0x26/0x30 [ 55.611337] x64_sys_call+0x1d8e/0x20c0 [ 55.611339] do_syscall_64+0x4f/0x120 [ 55.611343] entry_SYSCALL_64_after_hwframe+0x76/0x7e On PTL, GP counter 0 and 1 doesn't support auto counter reload feature, thus it would trigger a #GP when trying to write 1 on bit 0 of CFG_B MSR which requires to enable auto counter reload on GP counter 0. The root cause of causing this issue is the check for auto counter reload (ACR) counter mask from user space is incorrect in intel_pmu_acr_late_setup() helper. It leads to an invalid ACR counter mask from user space could be set into hw.config1 and then written into CFG_B MSRs and trigger the MSR access warning. e.g., User may create a perf event with ACR counter mask (config2=0xcb), and there is only 1 event created, so "cpuc->n_events" is 1. The correct check condition should be "i + idx >= cpuc->n_events" instead of "i + idx > cpuc->n_events" (it looks a typo). Otherwise, the counter mask would traverse twice and an invalid "cpuc->assign[1]" bit (bit 0) is set into hw.config1 and cause MSR accessing error. Besides, also check if the ACR counter mask corresponding events are ACR events. If not, filter out these counter mask. If a event is not a ACR event, it could be scheduled to an HW counter which doesn't support ACR. It's invalid to add their counter index in ACR counter mask. Furthermore, remove the WARN_ON_ONCE() since it's easily triggered as user could set any invalid ACR counter mask and the warning message could mislead users.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/events/intel/core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c6cca4213b618c92e4972919ee568f0fb87313b1",
              "status": "affected",
              "version": "ec980e4facef8110f6fce27e5b6344660117f01f",
              "versionType": "git"
            },
            {
              "lessThan": "43796f30507802d93ead2dc44fc9637f34671a89",
              "status": "affected",
              "version": "ec980e4facef8110f6fce27e5b6344660117f01f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/events/intel/core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf/x86/intel: Fix IA32_PMC_x_CFG_B MSRs access error\n\nWhen running perf_fuzzer on PTL, sometimes the below \"unchecked MSR\n access error\" is seen when accessing IA32_PMC_x_CFG_B MSRs.\n\n[   55.611268] unchecked MSR access error: WRMSR to 0x1986 (tried to write 0x0000000200000001) at rIP: 0xffffffffac564b28 (native_write_msr+0x8/0x30)\n[   55.611280] Call Trace:\n[   55.611282]  \u003cTASK\u003e\n[   55.611284]  ? intel_pmu_config_acr+0x87/0x160\n[   55.611289]  intel_pmu_enable_acr+0x6d/0x80\n[   55.611291]  intel_pmu_enable_event+0xce/0x460\n[   55.611293]  x86_pmu_start+0x78/0xb0\n[   55.611297]  x86_pmu_enable+0x218/0x3a0\n[   55.611300]  ? x86_pmu_enable+0x121/0x3a0\n[   55.611302]  perf_pmu_enable+0x40/0x50\n[   55.611307]  ctx_resched+0x19d/0x220\n[   55.611309]  __perf_install_in_context+0x284/0x2f0\n[   55.611311]  ? __pfx_remote_function+0x10/0x10\n[   55.611314]  remote_function+0x52/0x70\n[   55.611317]  ? __pfx_remote_function+0x10/0x10\n[   55.611319]  generic_exec_single+0x84/0x150\n[   55.611323]  smp_call_function_single+0xc5/0x1a0\n[   55.611326]  ? __pfx_remote_function+0x10/0x10\n[   55.611329]  perf_install_in_context+0xd1/0x1e0\n[   55.611331]  ? __pfx___perf_install_in_context+0x10/0x10\n[   55.611333]  __do_sys_perf_event_open+0xa76/0x1040\n[   55.611336]  __x64_sys_perf_event_open+0x26/0x30\n[   55.611337]  x64_sys_call+0x1d8e/0x20c0\n[   55.611339]  do_syscall_64+0x4f/0x120\n[   55.611343]  entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nOn PTL, GP counter 0 and 1 doesn\u0027t support auto counter reload feature,\nthus it would trigger a #GP when trying to write 1 on bit 0 of CFG_B MSR\nwhich requires to enable auto counter reload on GP counter 0.\n\nThe root cause of causing this issue is the check for auto counter\nreload (ACR) counter mask from user space is incorrect in\nintel_pmu_acr_late_setup() helper. It leads to an invalid ACR counter\nmask from user space could be set into hw.config1 and then written into\nCFG_B MSRs and trigger the MSR access warning.\n\ne.g., User may create a perf event with ACR counter mask (config2=0xcb),\nand there is only 1 event created, so \"cpuc-\u003en_events\" is 1.\n\nThe correct check condition should be \"i + idx \u003e= cpuc-\u003en_events\"\ninstead of \"i + idx \u003e cpuc-\u003en_events\" (it looks a typo). Otherwise,\nthe counter mask would traverse twice and an invalid \"cpuc-\u003eassign[1]\"\nbit (bit 0) is set into hw.config1 and cause MSR accessing error.\n\nBesides, also check if the ACR counter mask corresponding events are\nACR events. If not, filter out these counter mask. If a event is not a\nACR event, it could be scheduled to an HW counter which doesn\u0027t support\nACR. It\u0027s invalid to add their counter index in ACR counter mask.\n\nFurthermore, remove the WARN_ON_ONCE() since it\u0027s easily triggered as\nuser could set any invalid ACR counter mask and the warning message\ncould mislead users."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nperf/x86/intel: Correcci\u00f3n del error de acceso a los MSR IA32_PMC_x_CFG_B\n\nAl ejecutar perf_fuzzer en PTL, a veces se observa el siguiente \u201cerror de acceso MSR no verificado\u201d al acceder a los MSR IA32_PMC_x_CFG_B.\n\n[ 55.611268] error de acceso MSR no verificado: WRMSR a 0x1986 (intent\u00f3 escribir 0x0000000200000001) en rIP: 0xffffffffac564b28 (native_write_msr+0x8/0x30)\n[ 55.611280] Traza de Llamada:\n[ 55.611282] \u003cTASK\u003e\n[ 55.611284] ? intel_pmu_config_acr+0x87/0x160\n[ 55.611289] intel_pmu_enable_acr+0x6d/0x80\n[ 55.611291] intel_pmu_enable_event+0xce/0x460\n[ 55.611293] x86_pmu_start+0x78/0xb0\n[ 55.611297] x86_pmu_enable+0x218/0x3a0\n[ 55.611300] ? x86_pmu_enable+0x121/0x3a0\n[ 55.611302] perf_pmu_enable+0x40/0x50\n[ 55.611307] ctx_resched+0x19d/0x220\n[ 55.611309] __perf_install_in_context+0x284/0x2f0\n[ 55.611311] ? __pfx_remote_function+0x10/0x10\n[ 55.611314] remote_function+0x52/0x70\n[ 55.611317] ? __pfx_remote_function+0x10/0x10\n[ 55.611319] generic_exec_single+0x84/0x150\n[ 55.611323] smp_call_function_single+0xc5/0x1a0\n[ 55.611326] ? __pfx_remote_function+0x10/0x10\n[ 55.611329] perf_install_in_context+0xd1/0x1e0\n[ 55.611331] ? __pfx___perf_install_in_context+0x10/0x10\n[ 55.611333] __do_sys_perf_event_open+0xa76/0x1040\n[ 55.611336] __x64_sys_perf_event_open+0x26/0x30\n[ 55.611337] x64_sys_call+0x1d8e/0x20c0\n[ 55.611339] do_syscall_64+0x4f/0x120\n[ 55.611343] entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nEn PTL, los contadores GP 0 y 1 no soportan la caracter\u00edstica de recarga autom\u00e1tica de contador, por lo tanto, activar\u00eda un #GP al intentar escribir 1 en el bit 0 del MSR CFG_B, lo que requiere habilitar la recarga autom\u00e1tica de contador en el contador GP 0.\n\nLa causa ra\u00edz de este problema es que la verificaci\u00f3n de la m\u00e1scara de contador de recarga autom\u00e1tica (ACR) desde el espacio de usuario es incorrecta en la funci\u00f3n auxiliar intel_pmu_acr_late_setup(). Esto lleva a que una m\u00e1scara de contador ACR inv\u00e1lida desde el espacio de usuario podr\u00eda establecerse en hw.config1 y luego escribirse en los MSR CFG_B y activar la advertencia de acceso MSR.\n\nPor ejemplo, el usuario puede crear un evento perf con una m\u00e1scara de contador ACR (config2=0xcb), y solo se crea 1 evento, por lo que \u201ccpuc-\u003en_events\u201d es 1.\n\nLa condici\u00f3n de verificaci\u00f3n correcta deber\u00eda ser \u201ci + idx \u003e= cpuc-\u003en_events\u201d en lugar de \u201ci + idx \u003e cpuc-\u003en_events\u201d (parece un error tipogr\u00e1fico). De lo contrario, la m\u00e1scara de contador se recorrer\u00eda dos veces y un bit \u201ccpuc-\u003eassign[1]\u201d inv\u00e1lido (bit 0) se establecer\u00eda en hw.config1 y causar\u00eda un error de acceso MSR.\n\nAdem\u00e1s, tambi\u00e9n se debe verificar si los eventos correspondientes a la m\u00e1scara de contador ACR son eventos ACR. Si no, filtrar esta m\u00e1scara de contador. Si un evento no es un evento ACR, podr\u00eda programarse en un contador de hardware que no soporta ACR. Es inv\u00e1lido a\u00f1adir su \u00edndice de contador en la m\u00e1scara de contador ACR.\n\nAdem\u00e1s, eliminar el WARN_ON_ONCE() ya que se activa f\u00e1cilmente, puesto que el usuario podr\u00eda establecer cualquier m\u00e1scara de contador ACR inv\u00e1lida y el mensaje de advertencia podr\u00eda inducir a error a los usuarios."
    }
  ],
  "id": "CVE-2025-40122",
  "lastModified": "2026-10-19T21:10:00.160",
  "metrics": {},
  "published": "2025-11-12T11:15:41.677",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/43796f30507802d93ead2dc44fc9637f34671a89"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/c6cca4213b618c92e4972919ee568f0fb87313b1"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Deferred"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.