# CVE-2024-26791: btrfs: dev-replace: properly validate device names

- Priority: **Routine**
- Reason: Not severe (CVSS 7.1, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-04-04 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2024-26791, DEBIAN-CVE-2024-26791
- Record: https://cvemate.com/vulnerability/CVE-2024-26791 · JSON: https://cvemate.com/vulnerability/CVE-2024-26791/json

## Description

```text
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).
```

## Signals

- CVSS: 7.1 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- EPSS: 0.247%, percentile 17.087%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 121)

- debian linux (Debian): \< 6.1.82-1 \| \< 6.7.9-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-186.206 \| \< 5.15.0-112.122
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1126.136 \| \< 5.15.0-1063.69
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1063.69~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1126.136~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1126.136+fips2 \| \< 5.15.0-1063.69+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1131.138 \| \< 5.15.0-1066.75
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 25)

- <https://git.kernel.org/stable/c/11d7a2e429c02d51e2dc90713823ea8b8d3d3a84>
- <https://git.kernel.org/stable/c/c6652e20d7d783d060fe5f987eac7b5cabe31311>
- <https://git.kernel.org/stable/c/2886fe308a83968dde252302884a1e63351cf16d>
- <https://git.kernel.org/stable/c/ab2d68655d0f04650bef09fee948ff80597c5fb9>
- <https://git.kernel.org/stable/c/f590040ce2b712177306b03c2a63b16f7d48d3c8>
- <https://git.kernel.org/stable/c/b1690ced4d2d8b28868811fb81cd33eee5aefee1>
- <https://git.kernel.org/stable/c/343eecb4ff49a7b1cc1dfe86958a805cf2341cfb>
- <https://git.kernel.org/stable/c/9845664b9ee47ce7ee7ea93caf47d39a9d4552c4>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- <https://ubuntu.com/security/CVE-2024-26791>
- <https://www.cve.org/CVERecord?id=CVE-2024-26791>
- <https://ubuntu.com/security/notices/USN-6820-1>
- <https://ubuntu.com/security/notices/USN-6821-1>
- <https://ubuntu.com/security/notices/USN-6821-2>
- <https://ubuntu.com/security/notices/USN-6828-1>
- <https://ubuntu.com/security/notices/USN-6820-2>
- <https://ubuntu.com/security/notices/USN-6821-3>
- <https://ubuntu.com/security/notices/USN-6831-1>
- <https://ubuntu.com/security/notices/USN-6821-4>

---

Data as of 2026-12-05T06:40:56.285Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
