{
  "cveId": "CVE-2024-35798",
  "url": "https://patchblox.com/security/cve/CVE-2024-35798",
  "summary": "CVE-2024-35798 is fixed in linux on 1 platform, first by DEBIAN-CVE-2024-35798, released May 17, 2024. It is not reported as exploited. Patch Radar priority: Routine.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix race in read_extent_buffer_pages()  T...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  btrfs: fix race in read_extent_buffer_pages()  There are reports from tree-checker that detects corrupted nodes, without any obvious pattern so possibly an overwrite in memory. After some debugging it turns out there\u0027s a race when reading an extent buffer the uptodate status can be missed.  To prevent concurrent reads for the same extent buffer, read_extent_buffer_pages() performs these checks:      /* (1) */     if (test_bit(EXTENT_BUFFER_UPTODATE, \u0026eb-\u003Ebflags))         return 0;      /* (2) */     if (test_and_set_bit(EXTENT_BUFFER_READING, \u0026eb-\u003Ebflags))         goto done;  At this point, it seems safe to start the actual read operation. Once that completes, end_bbio_meta_read() does      /* (3) */     set_extent_buffer_uptodate(eb);      /* (4) */     clear_bit(EXTENT_BUFFER_READING, \u0026eb-\u003Ebflags);  Normally, this is enough to ensure only one read happens, and all other callers wait for it to finish before returning.  Unfortunately, there is a racey interleaving:      Thread A | Thread B | Thread C     ---------\u002B----------\u002B---------        (1)   |          |              |    (1)   |        (2)   |          |        (3)   |          |        (4)   |          |              |    (2)   |              |          |    (1)  When this happens, thread B kicks of an unnecessary read. Worse, thread C will see UPTODATE set and return immediately, while the read from thread B is still in progress.  This race could result in tree-checker errors like this as the extent buffer is concurrently modified:      BTRFS critical (device dm-0): corrupted node, root=256     block=8550954455682405139 owner mismatch, have 11858205567642294356     expect [256, 18446744073709551360]  Fix it by testing UPTODATE again after setting the READING bit, and if it\u0027s been set, skip the unnecessary read.  [ minor update of changelog ]",
  "published": "2024-05-17T14:15:12Z",
  "severity": "medium",
  "cvss": 4.7,
  "cvssVector": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
  "epss": 0.00179,
  "epssPercentile": 0.07477,
  "priority": "Routine",
  "priorityTier": 4,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.7.12-1",
      "fix": "DEBIAN-CVE-2024-35798",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-35798",
      "released": "2024-05-17T14:15:12Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.7.12-1",
      "fix": "DEBIAN-CVE-2024-35798",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2024-35798",
      "released": "2024-05-17T14:15:12Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T06:59:42Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}