8.8
HIGH CVSS 3.1
CVE-2026-43158
xfs: fix freemap adjustments when adding xattrs to leaf blocks
Description

In the Linux kernel, the following vulnerability has been resolved: xfs: fix freemap adjustments when adding xattrs to leaf blocks xfs/592 and xfs/794 both trip this assertion in the leaf block freemap adjustment code after ~20 minutes of running on my test VMs: ASSERT(ichdr->firstused >= ichdr->count * sizeof(xfs_attr_leaf_entry_t) + xfs_attr3_leaf_hdr_size(leaf)); Upon enabling quite a lot more debugging code, I narrowed this down to fsstress trying to set a local extended attribute with namelen=3 and valuelen=71. This results in an entry size of 80 bytes. At the start of xfs_attr3_leaf_add_work, the freemap looks like this: i 0 base 448 size 0 rhs 448 count 46 i 1 base 388 size 132 rhs 448 count 46 i 2 base 2120 size 4 rhs 448 count 46 firstused = 520 where "rhs" is the first byte past the end of the leaf entry array. This is inconsistent -- the entries array ends at byte 448, but freemap[1] says there's free space starting at byte 388! By the end of the function, the freemap is in worse shape: i 0 base 456 size 0 rhs 456 count 47 i 1 base 388 size 52 rhs 456 count 47 i 2 base 2120 size 4 rhs 456 count 47 firstused = 440 Important note: 388 is not aligned with the entries array element size of 8 bytes. Based on the incorrect freemap, the name area starts at byte 440, which is below the end of the entries array! That's why the assertion triggers and the filesystem shuts down. How did we end up here? First, recall from the previous patch that the freemap array in an xattr leaf block is not intended to be a comprehensive map of all free space in the leaf block. In other words, it's perfectly legal to have a leaf block with: * 376 bytes in use by the entries array * freemap[0] has [base = 376, size = 8] * freemap[1] has [base = 388, size = 1500] * the space between 376 and 388 is free, but the freemap stopped tracking that some time ago If we add one xattr, the entries array grows to 384 bytes, and freemap[0] becomes [base = 384, size = 0]. So far, so good. But if we add a second xattr, the entries array grows to 392 bytes, and freemap[0] gets pushed up to [base = 392, size = 0]. This is bad, because freemap[1] hasn't been updated, and now the entries array and the free space claim the same space. The fix here is to adjust all freemap entries so that none of them collide with the entries array. Note that this fix relies on commit 2a2b5932db6758 ("xfs: fix attr leaf header freemap.size underflow") and the previous patch that resets zero length freemap entries to have base = 0.

INFO

Published Date :

May 6, 2026, 12:16 p.m.

Last Modified :

Nov. 11, 2026, 9:10 p.m.

Remotely Exploit :

Yes !

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-43158 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 HIGH 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
Fix freemap adjustments when adding extended attributes to leaf blocks.
  • Update the Linux kernel to the resolved version.
  • Apply necessary patches for freemap adjustments.
  • Ensure filesystem integrity after updates.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-43158 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-43158 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-43158 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Nov. 11, 2026

    Action Type Old Value New Value
    Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: xfs: soluciona los ajustes del freemap al añadir xattrs a bloques hoja xfs/592 y xfs/794 ambos activan esta aserción en el código de ajuste del freemap del bloque hoja después de ~20 minutos de ejecución en mis máquinas virtuales de prueba: ASSERT(ichdr -> firstused >= ichdr -> count * sizeof(xfs_attr_leaf_entry_t) + xfs_attr3_leaf_hdr_size(leaf)); Al habilitar mucho más código de depuración, lo reduje a fsstress intentando establecer un atributo extendido local con namelen=3 y valuelen=71. Esto resulta en un tamaño de entrada de 80 bytes. Al inicio de xfs_attr3_leaf_add_work, el freemap se ve así: i 0 base 448 size 0 rhs 448 count 46 i 1 base 388 size 132 rhs 448 count 46 i 2 base 2120 size 4 rhs 448 count 46 firstused = 520 donde ’rhs’ es el primer byte después del final del array de entradas de la hoja. Esto es inconsistente: el array de entradas termina en el byte 448, ¡pero freemap[1] dice que hay espacio libre a partir del byte 388! Al final de la función, el freemap está en peor estado: i 0 base 456 size 0 rhs 456 count 47 i 1 base 388 size 52 rhs 456 count 47 i 2 base 2120 size 4 rhs 456 count 47 firstused = 440 Nota importante: 388 no está alineado con el tamaño de elemento del array de entradas de 8 bytes. Basado en el freemap incorrecto, el área de nombres comienza en el byte 440, ¡lo cual está por debajo del final del array de entradas! Por eso la aserción se activa y el sistema de archivos se apaga. ¿Cómo llegamos a esto? Primero, recordemos del parche anterior que el array freemap en un bloque hoja xattr no está destinado a ser un mapa exhaustivo de todo el espacio libre en el bloque hoja. En otras palabras, es perfectamente legal tener un bloque hoja con: * 376 bytes en uso por el array de entradas * freemap[0] tiene [base = 376, size = 8] * freemap[1] tiene [base = 388, size = 1500] * el espacio entre 376 y 388 está libre, pero el freemap dejó de rastrearlo hace algún tiempo Si añadimos un xattr, el array de entradas crece a 384 bytes, y freemap[0] se convierte en [base = 384, size = 0]. Hasta ahora, todo bien. Pero si añadimos un segundo xattr, el array de entradas crece a 392 bytes, y freemap[0] se desplaza a [base = 392, size = 0]. Esto es malo, porque freemap[1] no ha sido actualizado, y ahora el array de entradas y el espacio libre reclaman el mismo espacio. La solución aquí es ajustar todas las entradas del freemap para que ninguna de ellas colisione con el array de entradas. Tenga en cuenta que esta solución se basa en el commit 2a2b5932db6758 (’xfs: corrige el desbordamiento negativo de freemap.size del encabezado de la hoja de atributos’) y el parche anterior que restablece las entradas del freemap de longitud cero para que tengan base = 0.
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Oct. 19, 2026

    Action Type Old Value New Value
    Added CWE CWE-664
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Oct. 16, 2026

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/24ce71852f2cee6581e2cbebc15489ed52bf63b7
    Added Reference https://git.kernel.org/stable/c/38613c01f69e1e77e6b8acab1e8ac665d01c2f15
    Added Reference https://git.kernel.org/stable/c/3eefc0c2b78444b64feeb3783c017d6adc3cd3ce
    Added Reference https://git.kernel.org/stable/c/43f3b18679615a93bd848afde3602ba160637a46
    Added Reference https://git.kernel.org/stable/c/6a8737afbccc340e718e0b22577312826390be8b
    Added Reference https://git.kernel.org/stable/c/a396b3d73d51355e50acdb403ba9c4cae4c1174e
    Added Reference https://git.kernel.org/stable/c/d08976725355b9d54d8332fce223fa281cc304a5
    Added Reference https://git.kernel.org/stable/c/ef42a8766ff3fdf51cf72fb36d0859c09d134478
    Removed Reference https://git.kernel.org/stable/c/24ce71852f2cee6581e2cbebc15489ed52bf63b7
    Removed Reference https://git.kernel.org/stable/c/38613c01f69e1e77e6b8acab1e8ac665d01c2f15
    Removed Reference https://git.kernel.org/stable/c/3eefc0c2b78444b64feeb3783c017d6adc3cd3ce
    Removed Reference https://git.kernel.org/stable/c/43f3b18679615a93bd848afde3602ba160637a46
    Removed Reference https://git.kernel.org/stable/c/6a8737afbccc340e718e0b22577312826390be8b
    Removed Reference https://git.kernel.org/stable/c/a396b3d73d51355e50acdb403ba9c4cae4c1174e
    Removed Reference https://git.kernel.org/stable/c/d08976725355b9d54d8332fce223fa281cc304a5
    Removed Reference https://git.kernel.org/stable/c/ef42a8766ff3fdf51cf72fb36d0859c09d134478
    Removed Reference Type https://git.kernel.org/stable/c/24ce71852f2cee6581e2cbebc15489ed52bf63b7 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/38613c01f69e1e77e6b8acab1e8ac665d01c2f15 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/3eefc0c2b78444b64feeb3783c017d6adc3cd3ce Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/43f3b18679615a93bd848afde3602ba160637a46 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/6a8737afbccc340e718e0b22577312826390be8b Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/a396b3d73d51355e50acdb403ba9c4cae4c1174e Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/d08976725355b9d54d8332fce223fa281cc304a5 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/ef42a8766ff3fdf51cf72fb36d0859c09d134478 Types: Patch
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Oct. 16, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-43158', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-10-16T15:15:15.222436Z'}
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 17, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': 'd08976725355b9d54d8332fce223fa281cc304a5', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': '6a8737afbccc340e718e0b22577312826390be8b', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': 'a396b3d73d51355e50acdb403ba9c4cae4c1174e', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': '38613c01f69e1e77e6b8acab1e8ac665d01c2f15', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': 'ef42a8766ff3fdf51cf72fb36d0859c09d134478', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': '43f3b18679615a93bd848afde3602ba160637a46', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': '24ce71852f2cee6581e2cbebc15489ed52bf63b7', 'versionType': 'git'}, {'status': 'affected', 'version': '1da177e4c3f41524e886b7f1b8a0c1fc7321cac2', 'lessThan': '3eefc0c2b78444b64feeb3783c017d6adc3cd3ce', 'versionType': 'git'}], 'programFiles': ['fs/xfs/libxfs/xfs_attr_leaf.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '2.6.12'}, {'status': 'unaffected', 'version': '0', 'lessThan': '2.6.12', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '5.10.252', 'versionType': 'semver', 'lessThanOrEqual': '5.10.*'}, {'status': 'unaffected', 'version': '5.15.202', 'versionType': 'semver', 'lessThanOrEqual': '5.15.*'}, {'status': 'unaffected', 'version': '6.1.165', 'versionType': 'semver', 'lessThanOrEqual': '6.1.*'}, {'status': 'unaffected', 'version': '6.6.128', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.75', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.16', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.6', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/xfs/libxfs/xfs_attr_leaf.c'], 'defaultStatus': 'affected'}]
  • Initial Analysis by [email protected]

    May. 13, 2026

    Action Type Old Value New Value
    Added CWE CWE-787
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.128 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.12.75 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.16 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.6 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.202 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.165 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 2.6.12.1 up to (excluding) 5.10.252
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/24ce71852f2cee6581e2cbebc15489ed52bf63b7 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/38613c01f69e1e77e6b8acab1e8ac665d01c2f15 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/3eefc0c2b78444b64feeb3783c017d6adc3cd3ce Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/43f3b18679615a93bd848afde3602ba160637a46 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/6a8737afbccc340e718e0b22577312826390be8b Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/a396b3d73d51355e50acdb403ba9c4cae4c1174e Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/d08976725355b9d54d8332fce223fa281cc304a5 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/ef42a8766ff3fdf51cf72fb36d0859c09d134478 Types: Patch
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 08, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 06, 2026

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: xfs: fix freemap adjustments when adding xattrs to leaf blocks xfs/592 and xfs/794 both trip this assertion in the leaf block freemap adjustment code after ~20 minutes of running on my test VMs: ASSERT(ichdr->firstused >= ichdr->count * sizeof(xfs_attr_leaf_entry_t) + xfs_attr3_leaf_hdr_size(leaf)); Upon enabling quite a lot more debugging code, I narrowed this down to fsstress trying to set a local extended attribute with namelen=3 and valuelen=71. This results in an entry size of 80 bytes. At the start of xfs_attr3_leaf_add_work, the freemap looks like this: i 0 base 448 size 0 rhs 448 count 46 i 1 base 388 size 132 rhs 448 count 46 i 2 base 2120 size 4 rhs 448 count 46 firstused = 520 where "rhs" is the first byte past the end of the leaf entry array. This is inconsistent -- the entries array ends at byte 448, but freemap[1] says there's free space starting at byte 388! By the end of the function, the freemap is in worse shape: i 0 base 456 size 0 rhs 456 count 47 i 1 base 388 size 52 rhs 456 count 47 i 2 base 2120 size 4 rhs 456 count 47 firstused = 440 Important note: 388 is not aligned with the entries array element size of 8 bytes. Based on the incorrect freemap, the name area starts at byte 440, which is below the end of the entries array! That's why the assertion triggers and the filesystem shuts down. How did we end up here? First, recall from the previous patch that the freemap array in an xattr leaf block is not intended to be a comprehensive map of all free space in the leaf block. In other words, it's perfectly legal to have a leaf block with: * 376 bytes in use by the entries array * freemap[0] has [base = 376, size = 8] * freemap[1] has [base = 388, size = 1500] * the space between 376 and 388 is free, but the freemap stopped tracking that some time ago If we add one xattr, the entries array grows to 384 bytes, and freemap[0] becomes [base = 384, size = 0]. So far, so good. But if we add a second xattr, the entries array grows to 392 bytes, and freemap[0] gets pushed up to [base = 392, size = 0]. This is bad, because freemap[1] hasn't been updated, and now the entries array and the free space claim the same space. The fix here is to adjust all freemap entries so that none of them collide with the entries array. Note that this fix relies on commit 2a2b5932db6758 ("xfs: fix attr leaf header freemap.size underflow") and the previous patch that resets zero length freemap entries to have base = 0.
    Added Reference https://git.kernel.org/stable/c/24ce71852f2cee6581e2cbebc15489ed52bf63b7
    Added Reference https://git.kernel.org/stable/c/38613c01f69e1e77e6b8acab1e8ac665d01c2f15
    Added Reference https://git.kernel.org/stable/c/3eefc0c2b78444b64feeb3783c017d6adc3cd3ce
    Added Reference https://git.kernel.org/stable/c/43f3b18679615a93bd848afde3602ba160637a46
    Added Reference https://git.kernel.org/stable/c/6a8737afbccc340e718e0b22577312826390be8b
    Added Reference https://git.kernel.org/stable/c/a396b3d73d51355e50acdb403ba9c4cae4c1174e
    Added Reference https://git.kernel.org/stable/c/d08976725355b9d54d8332fce223fa281cc304a5
    Added Reference https://git.kernel.org/stable/c/ef42a8766ff3fdf51cf72fb36d0859c09d134478
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.