Skip to content
Heist/ feed
Back to feed
UnratedFix available

btrfs: dev-replace: properly validate device names

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: btrfs: dev-replace: properly validate device names There's a syzbot report that device name buffers passed to device replace are not properly checked for string termination which could lead to a read out of bounds in getname_kernel(). Add a helper that validates both source and target device name buffers. For devid as the source initialize the buffer to empty string in case something tries to read it later. This was originally analyzed and fixed in a different way by Edward Adam Davis (see links).

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.309, 5.10.212, 5.15.151, 5.4.271, 6.1.81, 6.6.21, 6.7.9
CVEs
CVE-2024-26791
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 17:56 UTC · Revision 1

Source evidence

btrfs: dev-replace: properly validate device names

core-osv · Original source

Published 4 Apr 2024, 08:20 UTC

In the Linux kernel, the following vulnerability has been resolved: btrfs: dev-replace: properly validate device names There's a syzbot report that device name buffers passed to device replace are not properly checked for string termination which could lead to a read out of bounds in getname_kernel(). Add a helper that validates both source and target device name buffers. For devid as the source initialize the buffer to empty string in case something tries to read it later. This was originally analyzed and fixed in a different way by Edward Adam Davis (see links).

osv:CVE-2024-26791

Kernel

Fixed versions: 4.19.309, 5.4.271, 5.10.212, 5.15.151, 6.1.81, 6.6.21, 6.7.9

Complete source record
{
  "id": "d282ea7b8fb43e689203ea265906f2dbc1a111f5788056b164d66a2656572ac4",
  "url": "https://osv.dev/vulnerability/CVE-2024-26791",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "btrfs: dev-replace: properly validate device names",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: btrfs: dev-replace: properly validate device names There's a syzbot report that device name buffers passed to device replace are not properly checked for string termination which could lead to a read out of bounds in getname_kernel(). Add a helper that validates both source and target device name buffers. For devid as the source initialize the buffer to empty string in case something tries to read it later. This was originally analyzed and fixed in a different way by Edward Adam Davis (see links).",
    "evidence": "osv:CVE-2024-26791",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.309",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.271",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.212",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.151",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.81",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.21",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.7.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-26791",
      "aliases": [
        "CVE-2024-26791"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e93c89c1aaaaaec3487c4c18dd02360371790722"
                },
                {
                  "fixed": "11d7a2e429c02d51e2dc90713823ea8b8d3d3a84"
                },
                {
                  "fixed": "c6652e20d7d783d060fe5f987eac7b5cabe31311"
                },
                {
                  "fixed": "2886fe308a83968dde252302884a1e63351cf16d"
                },
                {
                  "fixed": "ab2d68655d0f04650bef09fee948ff80597c5fb9"
                },
                {
                  "fixed": "f590040ce2b712177306b03c2a63b16f7d48d3c8"
                },
                {
                  "fixed": "b1690ced4d2d8b28868811fb81cd33eee5aefee1"
                },
                {
                  "fixed": "343eecb4ff49a7b1cc1dfe86958a805cf2341cfb"
                },
                {
                  "fixed": "9845664b9ee47ce7ee7ea93caf47d39a9d4552c4"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26791.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.8.0"
                },
                {
                  "fixed": "4.19.309"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.271"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.212"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.151"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.81"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.21"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.7.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26791.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.270527695Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/11d7a2e429c02d51e2dc90713823ea8b8d3d3a84",
        "https://git.kernel.org/stable/c/2886fe308a83968dde252302884a1e63351cf16d",
        "https://git.kernel.org/stable/c/343eecb4ff49a7b1cc1dfe86958a805cf2341cfb",
        "https://git.kernel.org/stable/c/9845664b9ee47ce7ee7ea93caf47d39a9d4552c4",
        "https://git.kernel.org/stable/c/ab2d68655d0f04650bef09fee948ff80597c5fb9",
        "https://git.kernel.org/stable/c/b1690ced4d2d8b28868811fb81cd33eee5aefee1",
        "https://git.kernel.org/stable/c/c6652e20d7d783d060fe5f987eac7b5cabe31311",
        "https://git.kernel.org/stable/c/f590040ce2b712177306b03c2a63b16f7d48d3c8",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26791.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-26791",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26791.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-26791",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 505535,
  "published_at": "2024-04-04T08:20:22.374+00:00"
}