CVE-2026-23181 (GCVE-0-2026-23181)

Vulnerability from cvelistv5 – Published: 2026-02-14 16:27 – Updated: 2026-02-16 08:58
VLAI?
Title
btrfs: sync read disk super and set block size
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: sync read disk super and set block size When the user performs a btrfs mount, the block device is not set correctly. The user sets the block size of the block device to 0x4000 by executing the BLKBSZSET command. Since the block size change also changes the mapping->flags value, this further affects the result of the mapping_min_folio_order() calculation. Let's analyze the following two scenarios: Scenario 1: Without executing the BLKBSZSET command, the block size is 0x1000, and mapping_min_folio_order() returns 0; Scenario 2: After executing the BLKBSZSET command, the block size is 0x4000, and mapping_min_folio_order() returns 2. do_read_cache_folio() allocates a folio before the BLKBSZSET command is executed. This results in the allocated folio having an order value of 0. Later, after BLKBSZSET is executed, the block size increases to 0x4000, and the mapping_min_folio_order() calculation result becomes 2. This leads to two undesirable consequences: 1. filemap_add_folio() triggers a VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping)) assertion. 2. The syzbot report [1] shows a null pointer dereference in create_empty_buffers() due to a buffer head allocation failure. Synchronization should be established based on the inode between the BLKBSZSET command and read cache page to prevent inconsistencies in block size or mapping flags before and after folio allocation. [1] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:create_empty_buffers+0x4d/0x480 fs/buffer.c:1694 Call Trace: folio_create_buffers+0x109/0x150 fs/buffer.c:1802 block_read_full_folio+0x14c/0x850 fs/buffer.c:2403 filemap_read_folio+0xc8/0x2a0 mm/filemap.c:2496 do_read_cache_folio+0x266/0x5c0 mm/filemap.c:4096 do_read_cache_page mm/filemap.c:4162 [inline] read_cache_page_gfp+0x29/0x120 mm/filemap.c:4195 btrfs_read_disk_super+0x192/0x500 fs/btrfs/volumes.c:1367
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 3c20917120ce61f2a123ca0810293872f4c6b5a4 , < ccb3c75d57039adb3170ae54a0d470e359705984 (git)
Affected: 3c20917120ce61f2a123ca0810293872f4c6b5a4 , < 3f29d661e5686f3aa14e6f11537ff5c49846f2e2 (git)
Create a notification for this product.
    Linux Linux Affected: 6.15
Unaffected: 0 , < 6.15 (semver)
Unaffected: 6.18.10 , ≤ 6.18.* (semver)
Unaffected: 6.19 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/volumes.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ccb3c75d57039adb3170ae54a0d470e359705984",
              "status": "affected",
              "version": "3c20917120ce61f2a123ca0810293872f4c6b5a4",
              "versionType": "git"
            },
            {
              "lessThan": "3f29d661e5686f3aa14e6f11537ff5c49846f2e2",
              "status": "affected",
              "version": "3c20917120ce61f2a123ca0810293872f4c6b5a4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/volumes.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.15"
            },
            {
              "lessThan": "6.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.19",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.10",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: sync read disk super and set block size\n\nWhen the user performs a btrfs mount, the block device is not set\ncorrectly. The user sets the block size of the block device to 0x4000\nby executing the BLKBSZSET command.\nSince the block size change also changes the mapping-\u003eflags value, this\nfurther affects the result of the mapping_min_folio_order() calculation.\n\nLet\u0027s analyze the following two scenarios:\n\nScenario 1: Without executing the BLKBSZSET command, the block size is\n0x1000, and mapping_min_folio_order() returns 0;\n\nScenario 2: After executing the BLKBSZSET command, the block size is\n0x4000, and mapping_min_folio_order() returns 2.\n\ndo_read_cache_folio() allocates a folio before the BLKBSZSET command\nis executed. This results in the allocated folio having an order value\nof 0. Later, after BLKBSZSET is executed, the block size increases to\n0x4000, and the mapping_min_folio_order() calculation result becomes 2.\n\nThis leads to two undesirable consequences:\n\n1. filemap_add_folio() triggers a VM_BUG_ON_FOLIO(folio_order(folio) \u003c\nmapping_min_folio_order(mapping)) assertion.\n\n2. The syzbot report [1] shows a null pointer dereference in\ncreate_empty_buffers() due to a buffer head allocation failure.\n\nSynchronization should be established based on the inode between the\nBLKBSZSET command and read cache page to prevent inconsistencies in\nblock size or mapping flags before and after folio allocation.\n\n[1]\nKASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\nRIP: 0010:create_empty_buffers+0x4d/0x480 fs/buffer.c:1694\nCall Trace:\n folio_create_buffers+0x109/0x150 fs/buffer.c:1802\n block_read_full_folio+0x14c/0x850 fs/buffer.c:2403\n filemap_read_folio+0xc8/0x2a0 mm/filemap.c:2496\n do_read_cache_folio+0x266/0x5c0 mm/filemap.c:4096\n do_read_cache_page mm/filemap.c:4162 [inline]\n read_cache_page_gfp+0x29/0x120 mm/filemap.c:4195\n btrfs_read_disk_super+0x192/0x500 fs/btrfs/volumes.c:1367"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-02-16T08:58:53.981Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ccb3c75d57039adb3170ae54a0d470e359705984"
        },
        {
          "url": "https://git.kernel.org/stable/c/3f29d661e5686f3aa14e6f11537ff5c49846f2e2"
        }
      ],
      "title": "btrfs: sync read disk super and set block size",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-23181",
    "datePublished": "2026-02-14T16:27:12.137Z",
    "dateReserved": "2026-01-13T15:37:45.984Z",
    "dateUpdated": "2026-02-16T08:58:53.981Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-23181\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-02-14T17:15:55.853\",\"lastModified\":\"2026-02-18T17:52:22.253\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbtrfs: sync read disk super and set block size\\n\\nWhen the user performs a btrfs mount, the block device is not set\\ncorrectly. The user sets the block size of the block device to 0x4000\\nby executing the BLKBSZSET command.\\nSince the block size change also changes the mapping-\u003eflags value, this\\nfurther affects the result of the mapping_min_folio_order() calculation.\\n\\nLet\u0027s analyze the following two scenarios:\\n\\nScenario 1: Without executing the BLKBSZSET command, the block size is\\n0x1000, and mapping_min_folio_order() returns 0;\\n\\nScenario 2: After executing the BLKBSZSET command, the block size is\\n0x4000, and mapping_min_folio_order() returns 2.\\n\\ndo_read_cache_folio() allocates a folio before the BLKBSZSET command\\nis executed. This results in the allocated folio having an order value\\nof 0. Later, after BLKBSZSET is executed, the block size increases to\\n0x4000, and the mapping_min_folio_order() calculation result becomes 2.\\n\\nThis leads to two undesirable consequences:\\n\\n1. filemap_add_folio() triggers a VM_BUG_ON_FOLIO(folio_order(folio) \u003c\\nmapping_min_folio_order(mapping)) assertion.\\n\\n2. The syzbot report [1] shows a null pointer dereference in\\ncreate_empty_buffers() due to a buffer head allocation failure.\\n\\nSynchronization should be established based on the inode between the\\nBLKBSZSET command and read cache page to prevent inconsistencies in\\nblock size or mapping flags before and after folio allocation.\\n\\n[1]\\nKASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\\nRIP: 0010:create_empty_buffers+0x4d/0x480 fs/buffer.c:1694\\nCall Trace:\\n folio_create_buffers+0x109/0x150 fs/buffer.c:1802\\n block_read_full_folio+0x14c/0x850 fs/buffer.c:2403\\n filemap_read_folio+0xc8/0x2a0 mm/filemap.c:2496\\n do_read_cache_folio+0x266/0x5c0 mm/filemap.c:4096\\n do_read_cache_page mm/filemap.c:4162 [inline]\\n read_cache_page_gfp+0x29/0x120 mm/filemap.c:4195\\n btrfs_read_disk_super+0x192/0x500 fs/btrfs/volumes.c:1367\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\\n\\nbtrfs: sincronizar la lectura del superbloque del disco y establecer el tama\u00f1o de bloque\\n\\nCuando el usuario realiza un montaje btrfs, el dispositivo de bloques no se configura correctamente. El usuario establece el tama\u00f1o de bloque del dispositivo de bloques a 0x4000 ejecutando el comando BLKBSZSET.\\nDado que el cambio de tama\u00f1o de bloque tambi\u00e9n modifica el valor de mapping-\u0026gt;flags, esto afecta a\u00fan m\u00e1s el resultado del c\u00e1lculo de mapping_min_folio_order().\\n\\nAnalicemos los dos escenarios siguientes:\\n\\nEscenario 1: Sin ejecutar el comando BLKBSZSET, el tama\u00f1o de bloque es 0x1000, y mapping_min_folio_order() devuelve 0;\\n\\nEscenario 2: Despu\u00e9s de ejecutar el comando BLKBSZSET, el tama\u00f1o de bloque es 0x4000, y mapping_min_folio_order() devuelve 2.\\n\\ndo_read_cache_folio() asigna un folio antes de que se ejecute el comando BLKBSZSET. Esto resulta en que el folio asignado tiene un valor de orden de 0. Posteriormente, despu\u00e9s de ejecutar BLKBSZSET, el tama\u00f1o de bloque aumenta a 0x4000, y el resultado del c\u00e1lculo de mapping_min_folio_order() se convierte en 2.\\n\\nEsto conduce a dos consecuencias indeseables:\\n\\n1. filemap_add_folio() activa una aserci\u00f3n VM_BUG_ON_FOLIO(folio_order(folio) \u0026lt; mapping_min_folio_order(mapping)).\\n\\n2. El informe de syzbot [1] muestra una desreferencia de puntero nulo en create_empty_buffers() debido a un fallo en la asignaci\u00f3n de un buffer head.\\n\\nSe debe establecer una sincronizaci\u00f3n basada en el inodo entre el comando BLKBSZSET y la p\u00e1gina de cach\u00e9 de lectura para evitar inconsistencias en el tama\u00f1o de bloque o las banderas de mapeo antes y despu\u00e9s de la asignaci\u00f3n de folio.\\n\\n[1]\\nKASAN: desreferencia de puntero nulo en el rango [0x0000000000000000-0x0000000000000007]\\nRIP: 0010:create_empty_buffers+0x4d/0x480 fs/buffer.c:1694\\nRastro de Llamada:\\n folio_create_buffers+0x109/0x150 fs/buffer.c:1802\\n block_read_full_folio+0x14c/0x850 fs/buffer.c:2403\\n filemap_read_folio+0xc8/0x2a0 mm/filemap.c:2496\\n do_read_cache_folio+0x266/0x5c0 mm/filemap.c:4096\\n do_read_cache_page mm/filemap.c:4162 [inline]\\n read_cache_page_gfp+0x29/0x120 mm/filemap.c:4195\\n btrfs_read_disk_super+0x192/0x500 fs/btrfs/volumes.c:1367\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3f29d661e5686f3aa14e6f11537ff5c49846f2e2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ccb3c75d57039adb3170ae54a0d470e359705984\",\"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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…