CVE-2025-38101 (GCVE-0-2025-38101)
Vulnerability from cvelistv5
Published
2025-07-03 08:35
Modified
2026-08-05 11:59
Summary
In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set() Enlarge the critical section in ring_buffer_subbuf_order_set() to ensure that error handling takes place with per-buffer mutex held, thus preventing list corruption and other concurrency-related issues.
Impacted products
Vendor Product Version
Linux Linux Version: f9b94daa542a8d2532f0930f01cd9aec2d19621b
Version: f9b94daa542a8d2532f0930f01cd9aec2d19621b
Version: f9b94daa542a8d2532f0930f01cd9aec2d19621b
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ring_buffer.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e09c0600beea469b3ebf974464e526a02d59ad62",
              "status": "affected",
              "version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
              "versionType": "git"
            },
            {
              "lessThan": "0fc9a295cd8e59c3636e97395e7c74a9c89fee42",
              "status": "affected",
              "version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
              "versionType": "git"
            },
            {
              "lessThan": "40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e",
              "status": "affected",
              "version": "f9b94daa542a8d2532f0930f01cd9aec2d19621b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ring_buffer.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.8"
            },
            {
              "lessThan": "6.8",
              "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.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.3",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set()\n\nEnlarge the critical section in ring_buffer_subbuf_order_set() to\nensure that error handling takes place with per-buffer mutex held,\nthus preventing list corruption and other concurrency-related issues."
        }
      ],
      "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 vulnerable function is reached only through a local `write()` to the tracefs file `buffer_subbuf_size_kb` (via `buffer_subbuf_size_write()`), with the error path armed by a local `mmap()` of `per_cpu/cpuN/trace_pipe_raw`. No remote or network-supplied data reaches `ring_buffer_subbuf_order_set()`.\nAC:L - The attacker owns both sides of the race \u2014 two threads writing `buffer_subbuf_size_kb` concurrently, with no `trace_types_lock` serializing `buffer_subbuf_size_write()` \u2014 and deterministically forces the unlocked `error:` path by mmap\u0027ing a later CPU\u0027s `trace_pipe_raw` so `cpu_buffer-\u003emapped` yields `-EBUSY` after earlier CPUs already allocated `new_pages`. The window spans a sleeping GFP_KERNEL allocation loop and a multi-page free loop whose length the attacker sets via `buffer_size_kb` and CPU count, and the attempt can be retried indefinitely.\nPR:L - No capability check exists anywhere on the path \u2014 `tracing_check_open_get_tr()` only tests `LOCKDOWN_TRACEFS` and `tracing_disabled` \u2014 so access is governed purely by tracefs DAC, which Android (`shell`, `traced_probes`/Perfetto), ChromeOS and observability/embedded deployments routinely delegate to ordinary non-root accounts and tracing groups. This matches the CNA\u0027s existing tracefs precedent (CVE-2025-38267, CVE-2025-68329, both PR:L).\nUI:N - The attacker performs the `mmap()` of `trace_pipe_raw` and both concurrent writes to `buffer_subbuf_size_kb` entirely from its own threads. No victim action, mount, or file open by another user is involved.\nS:U - The list corruption and freed-page reuse occur in the kernel\u0027s own ring-buffer allocations and stay within the host kernel\u0027s security authority. No VM, IOMMU, container, or sandbox boundary is crossed.\nC:H - The race leaves the live `cpu_buffer-\u003epages` list pointing at `struct buffer_page` objects and order-N data pages that the other thread has already handed back via `kfree()`/`free_pages()`, so the ring buffer keeps reading from memory that the slab and page allocators have reissued to other kernel users. Reading `trace` or `trace_pipe_raw` then discloses the contents of those reallocated kernel objects.\nI:H - Concurrent `list_del_init()` against a re-initialized head produces list corruption plus double-free of both a kmalloc\u0027d `struct buffer_page` and its `free_pages()` backing allocation \u2014 a classic heap-corruption primitive. Because `trace_marker` writes attacker-chosen bytes directly into ring-buffer data pages, the attacker can overwrite the freed-and-reallocated memory with controlled content, giving a write primitive usable for control-flow hijack.\nA:H - The corrupted linked list and double-free reliably oops the kernel \u2014 immediately under `CONFIG_DEBUG_LIST`, which turns the bad `__list_del_entry()` into a BUG, and otherwise through the subsequent `rb_check_pages()`/`rb_head_page_deactivate()` walk over freed pages. This was the syzbot-reported failure mode and the attacker can repeat it at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:59:32.011Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e09c0600beea469b3ebf974464e526a02d59ad62"
        },
        {
          "url": "https://git.kernel.org/stable/c/0fc9a295cd8e59c3636e97395e7c74a9c89fee42"
        },
        {
          "url": "https://git.kernel.org/stable/c/40ee2afafc1d9fe3aa44a6fbe440d78a5c96a72e"
        }
      ],
      "title": "ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38101",
    "datePublished": "2025-07-03T08:35:10.844Z",
    "dateReserved": "2025-04-16T04:51:23.985Z",
    "dateUpdated": "2026-08-05T11:59:32.011Z",
    "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…