CVE-2025-38076 (GCVE-0-2025-38076)
Vulnerability from cvelistv5
Published
2025-06-18 09:33
Modified
2025-06-18 09:33
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: alloc_tag: allocate percpu counters for module tags dynamically When a module gets unloaded it checks whether any of its tags are still in use and if so, we keep the memory containing module's allocation tags alive until all tags are unused. However percpu counters referenced by the tags are freed by free_module(). This will lead to UAF if the memory allocated by a module is accessed after module was unloaded. To fix this we allocate percpu counters for module allocation tags dynamically and we keep it alive for tags which are still in use after module unloading. This also removes the requirement of a larger PERCPU_MODULE_RESERVE when memory allocation profiling is enabled because percpu memory for counters does not need to be reserved anymore.
Impacted products
Vendor Product Version
Linux Linux Version: 0db6f8d7820a4b788565dac8eed52bfc2c3216da
Version: 0db6f8d7820a4b788565dac8eed52bfc2c3216da
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/linux/alloc_tag.h",
            "include/linux/codetag.h",
            "include/linux/percpu.h",
            "lib/alloc_tag.c",
            "lib/codetag.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "3cc733e6d96c938d2b82be96858a0ab900eb6fdc",
              "status": "affected",
              "version": "0db6f8d7820a4b788565dac8eed52bfc2c3216da",
              "versionType": "git"
            },
            {
              "lessThan": "12ca42c237756182aad8ab04654c952765cb9061",
              "status": "affected",
              "version": "0db6f8d7820a4b788565dac8eed52bfc2c3216da",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/linux/alloc_tag.h",
            "include/linux/codetag.h",
            "include/linux/percpu.h",
            "lib/alloc_tag.c",
            "lib/codetag.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.13"
            },
            {
              "lessThan": "6.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.9",
                  "versionStartIncluding": "6.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "6.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nalloc_tag: allocate percpu counters for module tags dynamically\n\nWhen a module gets unloaded it checks whether any of its tags are still in\nuse and if so, we keep the memory containing module\u0027s allocation tags\nalive until all tags are unused.  However percpu counters referenced by\nthe tags are freed by free_module().  This will lead to UAF if the memory\nallocated by a module is accessed after module was unloaded.\n\nTo fix this we allocate percpu counters for module allocation tags\ndynamically and we keep it alive for tags which are still in use after\nmodule unloading.  This also removes the requirement of a larger\nPERCPU_MODULE_RESERVE when memory allocation profiling is enabled because\npercpu memory for counters does not need to be reserved anymore."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T09:33:51.293Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/3cc733e6d96c938d2b82be96858a0ab900eb6fdc"
        },
        {
          "url": "https://git.kernel.org/stable/c/12ca42c237756182aad8ab04654c952765cb9061"
        }
      ],
      "title": "alloc_tag: allocate percpu counters for module tags dynamically",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38076",
    "datePublished": "2025-06-18T09:33:51.293Z",
    "dateReserved": "2025-04-16T04:51:23.980Z",
    "dateUpdated": "2025-06-18T09:33:51.293Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38076\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T10:15:41.110\",\"lastModified\":\"2025-06-18T13:46:52.973\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nalloc_tag: allocate percpu counters for module tags dynamically\\n\\nWhen a module gets unloaded it checks whether any of its tags are still in\\nuse and if so, we keep the memory containing module\u0027s allocation tags\\nalive until all tags are unused.  However percpu counters referenced by\\nthe tags are freed by free_module().  This will lead to UAF if the memory\\nallocated by a module is accessed after module was unloaded.\\n\\nTo fix this we allocate percpu counters for module allocation tags\\ndynamically and we keep it alive for tags which are still in use after\\nmodule unloading.  This also removes the requirement of a larger\\nPERCPU_MODULE_RESERVE when memory allocation profiling is enabled because\\npercpu memory for counters does not need to be reserved anymore.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: alloc_tag: asignar contadores por CPU para etiquetas de m\u00f3dulo din\u00e1micamente Cuando se descarga un m\u00f3dulo, este verifica si alguna de sus etiquetas a\u00fan est\u00e1 en uso y, de ser as\u00ed, mantenemos activa la memoria que contiene las etiquetas de asignaci\u00f3n del m\u00f3dulo hasta que todas las etiquetas est\u00e9n sin usar. Sin embargo, los contadores por CPU referenciados por las etiquetas son liberados por free_module(). Esto conducir\u00e1 a UAF si se accede a la memoria asignada por un m\u00f3dulo despu\u00e9s de que el m\u00f3dulo se haya descargado. Para corregir esto, asignamos contadores por CPU para etiquetas de asignaci\u00f3n de m\u00f3dulo din\u00e1micamente y los mantenemos activos para las etiquetas que a\u00fan est\u00e1n en uso despu\u00e9s de la descarga del m\u00f3dulo. Esto tambi\u00e9n elimina el requisito de un PERCPU_MODULE_RESERVE m\u00e1s grande cuando el perfil de asignaci\u00f3n de memoria est\u00e1 habilitado porque la memoria por CPU para los contadores ya no necesita reservarse.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/12ca42c237756182aad8ab04654c952765cb9061\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3cc733e6d96c938d2b82be96858a0ab900eb6fdc\",\"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…