{"id":"CVE-2026-31452","aliases":["CVE-2026-31452"],"related":[],"kind":"vulnerability","state":"published","title":"ext4: convert inline data to extents when truncate exceeds inline size","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: convert inline data to extents when truncate exceeds inline size\n\nAdd a check in ext4_setattr() to convert files from inline data storage\nto extent-based storage when truncate() grows the file size beyond the\ninline capacity. This prevents the filesystem from entering an\ninconsistent state where the inline data flag is set but the file size\nexceeds what can be stored inline.\n\nWithout this fix, the following sequence causes a kernel BUG_ON():\n\n1. Mount filesystem with inode that has inline flag set and small size\n2. truncate(file, 50MB) - grows size but inline flag remains set\n3. sendfile() attempts to write data\n4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity)\n\nThe crash occurs because ext4_write_inline_data() expects inline storage\nto accommodate the write, but the actual inline capacity (~60 bytes for\ni_block + ~96 bytes for xattrs) is far smaller than the file size and\nwrite request.\n\nThe fix checks if the new size from setattr exceeds the inode's actual\ninline capacity (EXT4_I(inode)->i_inline_size) and converts the file to\nextent-based storage before proceeding with the size change.\n\nThis addresses the root cause by ensuring the inline data flag and file\nsize remain consistent during truncate operations.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: convert inline data to extents when truncate exceeds inline size\n\nAdd a check in ext4_setattr() to convert files from inline data storage\nto extent-based storage when truncate() grows the file size beyond the\ninline capacity. This prevents the filesystem from entering an\ninconsistent state where the inline data flag is set but the file size\nexceeds what can be stored inline.\n\nWithout this fix, the following sequence causes a kernel BUG_ON():\n\n1. Mount filesystem with inode that has inline flag set and small size\n2. truncate(file, 50MB) - grows size but inline flag remains set\n3. sendfile() attempts to write data\n4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity)\n\nThe crash occurs because ext4_write_inline_data() expects inline storage\nto accommodate the write, but the actual inline capacity (~60 bytes for\ni_block + ~96 bytes for xattrs) is far smaller than the file size and\nwrite request.\n\nThe fix checks if the new size from setattr exceeds the inode's actual\ninline capacity (EXT4_I(inode)->i_inline_size) and converts the file to\nextent-based storage before proceeding with the size change.\n\nThis addresses the root cause by ensuring the inline data flag and file\nsize remain consistent during truncate operations.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\next4: convertir datos en línea a extensiones cuando truncate excede el tamaño en línea\n\nAñadir una comprobación en ext4_setattr() para convertir archivos de almacenamiento de datos en línea a almacenamiento basado en extensiones cuando truncate() aumenta el tamaño del archivo más allá de la capacidad en línea. Esto evita que el sistema de archivos entre en un estado inconsistente donde el indicador de datos en línea está establecido pero el tamaño del archivo excede lo que se puede almacenar en línea.\n\nSin esta corrección, la siguiente secuencia causa un BUG_ON() del kernel:\n\n1. Montar el sistema de archivos con un inodo que tiene el indicador en línea establecido y tamaño pequeño\n2. truncate(archivo, 50MB) - aumenta el tamaño pero el indicador en línea permanece establecido\n3. sendfile() intenta escribir datos\n4. ext4_write_inline_data() alcanza BUG_ON(write_size > inline_capacity)\n\nEl fallo ocurre porque ext4_write_inline_data() espera que el almacenamiento en línea acomode la escritura, pero la capacidad en línea real (~60 bytes para i_block + ~96 bytes para xattrs) es mucho menor que el tamaño del archivo y la solicitud de escritura.\n\nLa corrección comprueba si el nuevo tamaño de setattr excede la capacidad en línea real del inodo (EXT4_I(inode)  ->  i_inline_size) y convierte el archivo a almacenamiento basado en extensiones antes de proceder con el cambio de tamaño.\n\nEsto aborda la causa raíz al asegurar que el indicador de datos en línea y el tamaño del archivo permanezcan consistentes durante las operaciones de truncate.","source":"nvd"}],"published":"2026-04-22T13:53:46.917Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"110d7ef602659ce4d7947c5480f7ca2779696aaf","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"f53a5d9f32924bc2a810d2df243b7714da58b636","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"c047332be7195833a5c5126816c2502df8269fe4","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"699bac4d4c951974d55b045c983d1de777215949","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"7920dcc571cef3d8aa9ee109c136125d61d41669","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"93cb2d103e5c707de0f7ad58a39b7f0fddc27aa6","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"07c1a31af18290054da3d18221b8bf58983c5d3a","status":"affected"},{"type":"git","introduced":"67cf5b09a46f72e048501b84996f2f77bc42e947","fixed":"ed9356a30e59c7cc3198e7fc46cfedf3767b9b17","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.8","status":"unaffected"},{"type":"semver","introduced":"5.10.253","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.203","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.168","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.131","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.80","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.21","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.11","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.8","fixed":"5.10.253"},{"status":"affected","introduced":"5.11","fixed":"5.15.203"},{"status":"affected","introduced":"5.16","fixed":"6.1.168"},{"status":"affected","introduced":"6.2","fixed":"6.6.131"},{"status":"affected","introduced":"6.7","fixed":"6.12.80"},{"status":"affected","introduced":"6.13","fixed":"6.18.21"},{"status":"affected","introduced":"6.19","fixed":"6.19.11"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/110d7ef602659ce4d7947c5480f7ca2779696aaf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f53a5d9f32924bc2a810d2df243b7714da58b636","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c047332be7195833a5c5126816c2502df8269fe4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/699bac4d4c951974d55b045c983d1de777215949","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7920dcc571cef3d8aa9ee109c136125d61d41669","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/93cb2d103e5c707de0f7ad58a39b7f0fddc27aa6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/07c1a31af18290054da3d18221b8bf58983c5d3a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ed9356a30e59c7cc3198e7fc46cfedf3767b9b17","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:33:52.534Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31452","url":"https://www.cve.org/CVERecord?id=CVE-2026-31452","licence":"CVE Terms of Use","modified":"2026-11-10T12:44:28.408Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31452","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31452","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.269Z","epss":{"score":0.00178,"percentile":0.07724,"date":"2026-12-01T12:00:22.000Z"}}