CVE-2024-57849 (GCVE-0-2024-57849)
Vulnerability from cvelistv5
Published
2025-01-11 14:30
Modified
2025-05-04 10:05
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: s390/cpum_sf: Handle CPU hotplug remove during sampling CPU hotplug remove handling triggers the following function call sequence: CPUHP_AP_PERF_S390_SF_ONLINE --> s390_pmu_sf_offline_cpu() ... CPUHP_AP_PERF_ONLINE --> perf_event_exit_cpu() The s390 CPUMF sampling CPU hotplug handler invokes: s390_pmu_sf_offline_cpu() +--> cpusf_pmu_setup() +--> setup_pmc_cpu() +--> deallocate_buffers() This function de-allocates all sampling data buffers (SDBs) allocated for that CPU at event initialization. It also clears the PMU_F_RESERVED bit. The CPU is gone and can not be sampled. With the event still being active on the removed CPU, the CPU event hotplug support in kernel performance subsystem triggers the following function calls on the removed CPU: perf_event_exit_cpu() +--> perf_event_exit_cpu_context() +--> __perf_event_exit_context() +--> __perf_remove_from_context() +--> event_sched_out() +--> cpumsf_pmu_del() +--> cpumsf_pmu_stop() +--> hw_perf_event_update() to stop and remove the event. During removal of the event, the sampling device driver tries to read out the remaining samples from the sample data buffers (SDBs). But they have already been freed (and may have been re-assigned). This may lead to a use after free situation in which case the samples are most likely invalid. In the best case the memory has not been reassigned and still contains valid data. Remedy this situation and check if the CPU is still in reserved state (bit PMU_F_RESERVED set). In this case the SDBs have not been released an contain valid data. This is always the case when the event is removed (and no CPU hotplug off occured). If the PMU_F_RESERVED bit is not set, the SDB buffers are gone.
Impacted products
Vendor Product Version
Linux Linux Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/kernel/perf_cpum_sf.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "238e3af849dfdcb1faed544349f7025e533f9aab",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "99192c735ed4bfdff0d215ec85c8a87a677cb898",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "06a92f810df8037ca36157282ddcbefdcaf049b8",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "b5be6a0bb639d165c8418d8dddd8f322587be8be",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "a69752f1e5de817941a2ea0609254f6f25acd274",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "be54e6e0f93a39a9c00478d70d12956a5f3d5b9b",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "a0bd7dacbd51c632b8e2c0500b479af564afadf3",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/s390/kernel/perf_cpum_sf.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.287",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.231",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.174",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.287",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.231",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.174",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.120",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.66",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.5",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ns390/cpum_sf: Handle CPU hotplug remove during sampling\n\nCPU hotplug remove handling triggers the following function\ncall sequence:\n\n   CPUHP_AP_PERF_S390_SF_ONLINE  --\u003e s390_pmu_sf_offline_cpu()\n   ...\n   CPUHP_AP_PERF_ONLINE          --\u003e perf_event_exit_cpu()\n\nThe s390 CPUMF sampling CPU hotplug handler invokes:\n\n s390_pmu_sf_offline_cpu()\n +--\u003e  cpusf_pmu_setup()\n       +--\u003e setup_pmc_cpu()\n            +--\u003e deallocate_buffers()\n\nThis function de-allocates all sampling data buffers (SDBs) allocated\nfor that CPU at event initialization. It also clears the\nPMU_F_RESERVED bit. The CPU is gone and can not be sampled.\n\nWith the event still being active on the removed CPU, the CPU event\nhotplug support in kernel performance subsystem triggers the\nfollowing function calls on the removed CPU:\n\n  perf_event_exit_cpu()\n  +--\u003e perf_event_exit_cpu_context()\n       +--\u003e __perf_event_exit_context()\n\t    +--\u003e __perf_remove_from_context()\n\t         +--\u003e event_sched_out()\n\t              +--\u003e cpumsf_pmu_del()\n\t                   +--\u003e cpumsf_pmu_stop()\n                                +--\u003e hw_perf_event_update()\n\nto stop and remove the event. During removal of the event, the\nsampling device driver tries to read out the remaining samples from\nthe sample data buffers (SDBs). But they have already been freed\n(and may have been re-assigned). This may lead to a use after free\nsituation in which case the samples are most likely invalid. In the\nbest case the memory has not been reassigned and still contains\nvalid data.\n\nRemedy this situation and check if the CPU is still in reserved\nstate (bit PMU_F_RESERVED set). In this case the SDBs have not been\nreleased an contain valid data. This is always the case when\nthe event is removed (and no CPU hotplug off occured).\nIf the PMU_F_RESERVED bit is not set, the SDB buffers are gone."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T10:05:27.504Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/238e3af849dfdcb1faed544349f7025e533f9aab"
        },
        {
          "url": "https://git.kernel.org/stable/c/99192c735ed4bfdff0d215ec85c8a87a677cb898"
        },
        {
          "url": "https://git.kernel.org/stable/c/06a92f810df8037ca36157282ddcbefdcaf049b8"
        },
        {
          "url": "https://git.kernel.org/stable/c/b5be6a0bb639d165c8418d8dddd8f322587be8be"
        },
        {
          "url": "https://git.kernel.org/stable/c/a69752f1e5de817941a2ea0609254f6f25acd274"
        },
        {
          "url": "https://git.kernel.org/stable/c/be54e6e0f93a39a9c00478d70d12956a5f3d5b9b"
        },
        {
          "url": "https://git.kernel.org/stable/c/a0bd7dacbd51c632b8e2c0500b479af564afadf3"
        }
      ],
      "title": "s390/cpum_sf: Handle CPU hotplug remove during sampling",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-57849",
    "datePublished": "2025-01-11T14:30:58.365Z",
    "dateReserved": "2025-01-11T12:33:33.699Z",
    "dateUpdated": "2025-05-04T10:05:27.504Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-57849\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-01-11T15:15:07.290\",\"lastModified\":\"2025-01-11T15:15:07.290\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ns390/cpum_sf: Handle CPU hotplug remove during sampling\\n\\nCPU hotplug remove handling triggers the following function\\ncall sequence:\\n\\n   CPUHP_AP_PERF_S390_SF_ONLINE  --\u003e s390_pmu_sf_offline_cpu()\\n   ...\\n   CPUHP_AP_PERF_ONLINE          --\u003e perf_event_exit_cpu()\\n\\nThe s390 CPUMF sampling CPU hotplug handler invokes:\\n\\n s390_pmu_sf_offline_cpu()\\n +--\u003e  cpusf_pmu_setup()\\n       +--\u003e setup_pmc_cpu()\\n            +--\u003e deallocate_buffers()\\n\\nThis function de-allocates all sampling data buffers (SDBs) allocated\\nfor that CPU at event initialization. It also clears the\\nPMU_F_RESERVED bit. The CPU is gone and can not be sampled.\\n\\nWith the event still being active on the removed CPU, the CPU event\\nhotplug support in kernel performance subsystem triggers the\\nfollowing function calls on the removed CPU:\\n\\n  perf_event_exit_cpu()\\n  +--\u003e perf_event_exit_cpu_context()\\n       +--\u003e __perf_event_exit_context()\\n\\t    +--\u003e __perf_remove_from_context()\\n\\t         +--\u003e event_sched_out()\\n\\t              +--\u003e cpumsf_pmu_del()\\n\\t                   +--\u003e cpumsf_pmu_stop()\\n                                +--\u003e hw_perf_event_update()\\n\\nto stop and remove the event. During removal of the event, the\\nsampling device driver tries to read out the remaining samples from\\nthe sample data buffers (SDBs). But they have already been freed\\n(and may have been re-assigned). This may lead to a use after free\\nsituation in which case the samples are most likely invalid. In the\\nbest case the memory has not been reassigned and still contains\\nvalid data.\\n\\nRemedy this situation and check if the CPU is still in reserved\\nstate (bit PMU_F_RESERVED set). In this case the SDBs have not been\\nreleased an contain valid data. This is always the case when\\nthe event is removed (and no CPU hotplug off occured).\\nIf the PMU_F_RESERVED bit is not set, the SDB buffers are gone.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: s390/cpum_sf: Controlar la eliminaci\u00f3n de hotplug de la CPU durante el muestreo la gesti\u00f3n de la eliminaci\u00f3n de hotplug de la CPU activa la siguiente secuencia de llamada de funci\u00f3n: CPUHP_AP_PERF_S390_SF_ONLINE --\u0026gt; s390_pmu_sf_offline_cpu() ... CPUHP_AP_PERF_ONLINE --\u0026gt; perf_event_exit_cpu() El controlador de hotplug de la CPU de muestreo s390 CPUMF invoca: s390_pmu_sf_offline_cpu() +--\u0026gt; cpusf_pmu_setup() +--\u0026gt; setup_pmc_cpu() +--\u0026gt; deallocate_buffers() Esta funci\u00f3n anula la asignaci\u00f3n de todos los b\u00faferes de datos de muestreo (SDB) asignados para esa CPU en la inicializaci\u00f3n del evento. Tambi\u00e9n borra el bit PMU_F_RESERVED. La CPU desaparece y no se puede muestrear. Mientras el evento sigue activo en la CPU eliminada, la compatibilidad con hot plug de eventos de CPU en el subsistema de rendimiento del n\u00facleo activa las siguientes llamadas de funci\u00f3n en la CPU eliminada: perf_event_exit_cpu() +--\u0026gt; perf_event_exit_cpu_context() +--\u0026gt; __perf_event_exit_context() +--\u0026gt; __perf_remove_from_context() +--\u0026gt; event_sched_out() +--\u0026gt; cpumsf_pmu_del() +--\u0026gt; cpumsf_pmu_stop() +--\u0026gt; hw_perf_event_update() para detener y eliminar el evento. Durante la eliminaci\u00f3n del evento, el controlador del dispositivo de muestreo intenta leer las muestras restantes de los b\u00faferes de datos de muestra (SDB). Pero ya se han liberado (y es posible que se hayan reasignado). Esto puede provocar una situaci\u00f3n de use after free, en cuyo caso es muy probable que las muestras no sean v\u00e1lidas. En el mejor de los casos, la memoria no se ha reasignado y a\u00fan contiene datos v\u00e1lidos. Solucione esta situaci\u00f3n y compruebe si la CPU sigue en estado reservado (bit PMU_F_RESERVED activado). En este caso, los SDB no se han liberado y contienen datos v\u00e1lidos. Esto siempre ocurre cuando se elimina el evento (y no se ha producido ninguna desconexi\u00f3n en caliente de la CPU). Si el bit PMU_F_RESERVED no est\u00e1 activado, los b\u00faferes SDB desaparecen.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/06a92f810df8037ca36157282ddcbefdcaf049b8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/238e3af849dfdcb1faed544349f7025e533f9aab\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/99192c735ed4bfdff0d215ec85c8a87a677cb898\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a0bd7dacbd51c632b8e2c0500b479af564afadf3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a69752f1e5de817941a2ea0609254f6f25acd274\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b5be6a0bb639d165c8418d8dddd8f322587be8be\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/be54e6e0f93a39a9c00478d70d12956a5f3d5b9b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…