CVE-2025-38539 (GCVE-0-2025-38539)
Vulnerability from cvelistv5
Published
2025-08-16 11:12
Modified
2026-08-05 12:02
Summary
In the Linux kernel, the following vulnerability has been resolved: tracing: Add down_write(trace_event_sem) when adding trace event When a module is loaded, it adds trace events defined by the module. It may also need to modify the modules trace printk formats to replace enum names with their values. If two modules are loaded at the same time, the adding of the event to the ftrace_events list can corrupt the walking of the list in the code that is modifying the printk format strings and crash the kernel. The addition of the event should take the trace_event_sem for write while it adds the new event. Also add a lockdep_assert_held() on that semaphore in __trace_add_event_dirs() as it iterates the list.
Impacted products
Vendor Product Version
Linux Linux Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Version: 110bf2b764eb6026b868d84499263cb24b1bcc8d
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T17:39:34.419Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/trace_events.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e70f5ee4c8824736332351b703c46f9469ed7f6c",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "db45632479ceecb669612ed8dbce927e3c6279fc",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "ca60064ea03f14e06c763de018403cb56ba3207d",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "6bc94f20a4c304997288f9a45278c9d0c06987d3",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "33e20747b47ddc03569b6bc27a2d6894c1428182",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "70fecd519caad0c1741c3379d5348c9000a5b29d",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            },
            {
              "lessThan": "b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df",
              "status": "affected",
              "version": "110bf2b764eb6026b868d84499263cb24b1bcc8d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/trace_events.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.31"
            },
            {
              "lessThan": "2.6.31",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.297",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.241",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.190",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.147",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.100",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.40",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.8",
              "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": "5.4.297",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.241",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.190",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.147",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.100",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.40",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.8",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "2.6.31",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: Add down_write(trace_event_sem) when adding trace event\n\nWhen a module is loaded, it adds trace events defined by the module. It\nmay also need to modify the modules trace printk formats to replace enum\nnames with their values.\n\nIf two modules are loaded at the same time, the adding of the event to the\nftrace_events list can corrupt the walking of the list in the code that is\nmodifying the printk format strings and crash the kernel.\n\nThe addition of the event should take the trace_event_sem for write while\nit adds the new event.\n\nAlso add a lockdep_assert_held() on that semaphore in\n__trace_add_event_dirs() as it iterates the list."
        }
      ],
      "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 race is driven entirely through local operations \u2014 module load (init_module/finit_module or attacker-triggered autoload via socket()) and tracefs dynamic-event registration. No network or adjacent-network input reaches kernel/trace/trace_events.c.\nAC:L - The attacker controls both sides of the race, initiating the list-walking module load and the list-adding module load concurrently, and `trace_event_eval_update()` calls `cond_resched()` on every iteration over a list of thousands of events, making the preemption window very wide and the race practically winnable. Per race-condition guidance, attacker-created races are Low.\nPR:L - Both sides of the race are reachable by an unprivileged local user via kernel module autoloading (e.g. concurrent `socket(AF_RXRPC,\u2026)` loading rxrpc, whose TRACE_DEFINE_ENUM maps drive the unlocked walk, and `socket(AF_INET,SOCK_STREAM,IPPROTO_SCTP)` loading sctp, whose trace events drive the unlocked list_add), and containers granted CAP_SYS_MODULE can trigger it repeatably. No authentication beyond an ordinary local account is required.\nUI:N - The attacker triggers both concurrent module loads themselves; no victim action, mount, or file open by another user is needed.\nS:U - The corruption and its consequences are confined to kernel memory within the same security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - Following a torn list pointer, the walker dereferences an arbitrary `struct trace_event_call`, reading `call-\u003eprint_fmt` and traversing `call-\u003eclass-\u003efields` from wild addresses, and the resulting strings are persisted into `field-\u003etype`/`print_fmt` which are readable through `/sys/kernel/tracing/events/*/format`, giving kernel memory disclosure.\nI:H - `eval_replace()` performs in-place `snprintf`/`memmove` writes through the wild `call-\u003eprint_fmt` pointer and `update_event_fields()` stores `field-\u003etype = str`, yielding out-of-bounds writes; additionally `call-\u003emodule` is assigned after the unlocked list_add, so a racing walker can attach strings to a stale module pointer that a later unload frees, producing a use-after-free suitable for control-flow hijacking.\nA:H - The commit states outright that the unsynchronized list_add \"can corrupt the walking of the list ... and crash the kernel\"; the reported failure is a kernel oops/panic, and dereferencing a stale next pointer reliably faults."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:02:45.638Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e70f5ee4c8824736332351b703c46f9469ed7f6c"
        },
        {
          "url": "https://git.kernel.org/stable/c/db45632479ceecb669612ed8dbce927e3c6279fc"
        },
        {
          "url": "https://git.kernel.org/stable/c/ca60064ea03f14e06c763de018403cb56ba3207d"
        },
        {
          "url": "https://git.kernel.org/stable/c/7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b"
        },
        {
          "url": "https://git.kernel.org/stable/c/6bc94f20a4c304997288f9a45278c9d0c06987d3"
        },
        {
          "url": "https://git.kernel.org/stable/c/33e20747b47ddc03569b6bc27a2d6894c1428182"
        },
        {
          "url": "https://git.kernel.org/stable/c/70fecd519caad0c1741c3379d5348c9000a5b29d"
        },
        {
          "url": "https://git.kernel.org/stable/c/b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df"
        }
      ],
      "title": "tracing: Add down_write(trace_event_sem) when adding trace event",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38539",
    "datePublished": "2025-08-16T11:12:31.678Z",
    "dateReserved": "2025-04-16T04:51:24.024Z",
    "dateUpdated": "2026-08-05T12:02:45.638Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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…