{"id":"CVE-2023-52622","aliases":["CVE-2023-52622"],"related":[],"kind":"vulnerability","state":"published","title":"ext4: avoid online resizing failures due to oversized flex bg","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: avoid online resizing failures due to oversized flex bg\n\nWhen we online resize an ext4 filesystem with a oversized flexbg_size,\n\n     mkfs.ext4 -F -G 67108864 $dev -b 4096 100M\n     mount $dev $dir\n     resize2fs $dev 16G\n\nthe following WARN_ON is triggered:\n==================================================================\nWARNING: CPU: 0 PID: 427 at mm/page_alloc.c:4402 __alloc_pages+0x411/0x550\nModules linked in: sg(E)\nCPU: 0 PID: 427 Comm: resize2fs Tainted: G  E  6.6.0-rc5+ #314\nRIP: 0010:__alloc_pages+0x411/0x550\nCall Trace:\n <TASK>\n __kmalloc_large_node+0xa2/0x200\n __kmalloc+0x16e/0x290\n ext4_resize_fs+0x481/0xd80\n __ext4_ioctl+0x1616/0x1d90\n ext4_ioctl+0x12/0x20\n __x64_sys_ioctl+0xf0/0x150\n do_syscall_64+0x3b/0x90\n==================================================================\n\nThis is because flexbg_size is too large and the size of the new_group_data\narray to be allocated exceeds MAX_ORDER. Currently, the minimum value of\nMAX_ORDER is 8, the minimum value of PAGE_SIZE is 4096, the corresponding\nmaximum number of groups that can be allocated is:\n\n (PAGE_SIZE << MAX_ORDER) / sizeof(struct ext4_new_group_data) ≈ 21845\n\nAnd the value that is down-aligned to the power of 2 is 16384. Therefore,\nthis value is defined as MAX_RESIZE_BG, and the number of groups added\neach time does not exceed this value during resizing, and is added multiple\ntimes to complete the online resizing. The difference is that the metadata\nin a flex_bg may be more dispersed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: avoid online resizing failures due to oversized flex bg\n\nWhen we online resize an ext4 filesystem with a oversized flexbg_size,\n\n     mkfs.ext4 -F -G 67108864 $dev -b 4096 100M\n     mount $dev $dir\n     resize2fs $dev 16G\n\nthe following WARN_ON is triggered:\n==================================================================\nWARNING: CPU: 0 PID: 427 at mm/page_alloc.c:4402 __alloc_pages+0x411/0x550\nModules linked in: sg(E)\nCPU: 0 PID: 427 Comm: resize2fs Tainted: G  E  6.6.0-rc5+ #314\nRIP: 0010:__alloc_pages+0x411/0x550\nCall Trace:\n <TASK>\n __kmalloc_large_node+0xa2/0x200\n __kmalloc+0x16e/0x290\n ext4_resize_fs+0x481/0xd80\n __ext4_ioctl+0x1616/0x1d90\n ext4_ioctl+0x12/0x20\n __x64_sys_ioctl+0xf0/0x150\n do_syscall_64+0x3b/0x90\n==================================================================\n\nThis is because flexbg_size is too large and the size of the new_group_data\narray to be allocated exceeds MAX_ORDER. Currently, the minimum value of\nMAX_ORDER is 8, the minimum value of PAGE_SIZE is 4096, the corresponding\nmaximum number of groups that can be allocated is:\n\n (PAGE_SIZE << MAX_ORDER) / sizeof(struct ext4_new_group_data) ≈ 21845\n\nAnd the value that is down-aligned to the power of 2 is 16384. Therefore,\nthis value is defined as MAX_RESIZE_BG, and the number of groups added\neach time does not exceed this value during resizing, and is added multiple\ntimes to complete the online resizing. The difference is that the metadata\nin a flex_bg may be more dispersed.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ext4: evita fallos de cambio de tamaño en línea debido a flex bg sobredimensionado Cuando redimensionamos en línea un sistema de archivos ext4 con un flexbg_size sobredimensionado, mkfs.ext4 -F -G 67108864 $dev -b 4096 100M mount $dev $dir resize2fs $dev 16G se activa el siguiente WARN_ON: ===================================== ============================== ADVERTENCIA: CPU: 0 PID: 427 en mm/page_alloc.c:4402 __alloc_pages+0x411/ 0x550 Módulos vinculados en: sg(E) CPU: 0 PID: 427 Comm: resize2fs Contaminado: GE 6.6.0-rc5+ #314 RIP: 0010:__alloc_pages+0x411/0x550 Seguimiento de llamadas:  __kmalloc_large_node+0xa2/0x200 __kmalloc+ 0x16e/0x290 text4_resize_fs+0x481/0xd80 __ext4_ioctl+0x1616/0x1d90 text4_ioctl+0x12/0x20 __x64_sys_ioctl+0xf0/0x150 do_syscall_64+0x3b/0x90 ======== =============== ============================================ Esto se debe a que flexbg_size también lo es grande y el tamaño de la matriz new_group_data que se asignará excede MAX_ORDER. Actualmente, el valor mínimo de MAX_ORDER es 8, el valor mínimo de PAGE_SIZE es 4096, el número máximo correspondiente de grupos que se pueden asignar es: (PAGE_SIZE &lt;&lt; MAX_ORDER) / sizeof(struct text4_new_group_data) ? 21845 Y el valor que está hacia abajo -alineado a la potencia de 2 es 16384. Por lo tanto, este valor se define como MAX_RESIZE_BG, y el número de grupos agregados cada vez no excede este valor durante el cambio de tamaño y se agrega varias veces para completar el cambio de tamaño en línea. La diferencia es que los metadatos en flex_bg pueden estar más dispersos.","source":"nvd"}],"published":"2024-03-26T17:19:23.838Z","modified":"2026-10-15T01:17:15.333Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"cd1f93ca97a9136989f3bd2bf90696732a2ed644","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"b183fe8702e78bba3dcef8e7193cab6898abee07","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"cfbbb3199e71b63fc26cee0ebff327c47128a1e8","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"d76c8d7ffe163c6bf2f1ef680b0539c2b3902b90","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"6d2cbf517dcabc093159cf138ad5712c9c7fa954","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"8b1413dbfe49646eda2c00c0f1144ee9d3368e0c","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"dc3e0f55bec4410f3d74352c4a7c79f518088ee2","status":"affected"},{"type":"git","introduced":"28c7bac0091687e6116ebd6c179e154ae4053c90","fixed":"5d1935ac02ca5aee364a449a35e2977ea84509b0","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.3","status":"unaffected"},{"type":"semver","introduced":"4.19.307","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.269","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.210","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.149","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.77","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.16","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.4","lastAffected":"6.7.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.8","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","fixed":"4.19.307"},{"status":"affected","introduced":"4.20","fixed":"5.4.269"},{"status":"affected","introduced":"5.5","fixed":"5.10.210"},{"status":"affected","introduced":"5.11","fixed":"5.15.149"},{"status":"affected","introduced":"5.16","fixed":"6.1.77"},{"status":"affected","introduced":"6.2","fixed":"6.6.16"},{"status":"affected","introduced":"6.7","fixed":"6.7.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cd1f93ca97a9136989f3bd2bf90696732a2ed644","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b183fe8702e78bba3dcef8e7193cab6898abee07","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cfbbb3199e71b63fc26cee0ebff327c47128a1e8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d76c8d7ffe163c6bf2f1ef680b0539c2b3902b90","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6d2cbf517dcabc093159cf138ad5712c9c7fa954","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b1413dbfe49646eda2c00c0f1144ee9d3368e0c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dc3e0f55bec4410f3d74352c4a7c79f518088ee2","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5d1935ac02ca5aee364a449a35e2977ea84509b0","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-613116.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-09T19:32:18.763Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52622","url":"https://www.cve.org/CVERecord?id=CVE-2023-52622","licence":"CVE Terms of Use","modified":"2026-10-15T00:17:06.250Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52622","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52622","licence":"Public domain","modified":"2026-10-15T01:17:15.333Z"}],"updatedAt":"2026-11-25T22:58:33.397Z","epss":{"score":0.00324,"percentile":0.17939,"date":"2026-11-30T12:00:22.000Z"}}