CVE-2023-52622: ext4: avoid online resizing failures due to oversized flex bg

Published Mar 26, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ext4: avoid online resizing failures due to oversized flex bg

The Linux kernel CVE team has assigned CVE-2023-52622 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/20240326171931.1354035-5-lee@kernel.org/T

Other sources

In the Linux kernel, the following vulnerability has been resolved:

ext4: avoid online resizing failures due to oversized flex bg

When we online resize an ext4 filesystem with a oversized flexbgsize,

mkfs.ext4 -F -G 67108864 $dev -b 4096 100M mount $dev $dir resize2fs $dev 16G

the following WARNON is triggered: ================================================================== WARNING: CPU: 0 PID: 427 at mm/pagealloc.c:4402 allocpages+0x411/0x550 Modules linked in: sg(E) CPU: 0 PID: 427 Comm: resize2fs Tainted: G E 6.6.0-rc5+ #314 RIP: 0010:allocpages+0x411/0x550 Call Trace: kmalloclargenode+0xa2/0x200 kmalloc+0x16e/0x290 ext4resizefs+0x481/0xd80 ext4ioctl+0x1616/0x1d90 ext4ioctl+0x12/0x20 x64sysioctl+0xf0/0x150 dosyscall64+0x3b/0x90 ==================================================================

This is because flexbgsize is too large and the size of the newgroupdata array to be allocated exceeds MAXORDER. Currently, the minimum value of MAXORDER is 8, the minimum value of PAGESIZE is 4096, the corresponding maximum number of groups that can be allocated is:

(PAGESIZE << MAXORDER) / sizeof(struct ext4newgroupdata) ≈ 21845

And the value that is down-aligned to the power of 2 is 16384. Therefore, this value is defined as MAXRESIZEBG, and the number of groups added each time does not exceed this value during resizing, and is added multiple times to complete the online resizing. The difference is that the metadata in a flexbg may be more dispersed.

IBM

In the Linux kernel, the following vulnerability has been resolved:

ext4: avoid online resizing failures due to oversized flex bg

When we online resize an ext4 filesystem with a oversized flexbgsize,

mkfs.ext4 -F -G 67108864 $dev -b 4096 100M mount $dev $dir resize2fs $dev 16G

the following WARNON is triggered: ================================================================== WARNING: CPU: 0 PID: 427 at mm/pagealloc.c:4402 allocpages+0x411/0x550 Modules linked in: sg(E) CPU: 0 PID: 427 Comm: resize2fs Tainted: G E 6.6.0-rc5+ #314 RIP: 0010:allocpages+0x411/0x550 Call Trace: <TASK> kmalloclargenode+0xa2/0x200 kmalloc+0x16e/0x290 ext4resizefs+0x481/0xd80 ext4ioctl+0x1616/0x1d90 ext4ioctl+0x12/0x20 x64sysioctl+0xf0/0x150 dosyscall64+0x3b/0x90 ==================================================================

This is because flexbgsize is too large and the size of the newgroupdata array to be allocated exceeds MAXORDER. Currently, the minimum value of MAXORDER is 8, the minimum value of PAGESIZE is 4096, the corresponding maximum number of groups that can be allocated is:

(PAGESIZE << MAXORDER) / sizeof(struct ext4newgroupdata) ≈ 21845

And the value that is down-aligned to the power of 2 is 16384. Therefore, this value is defined as MAXRESIZEBG, and the number of groups added each time does not exceed this value during resizing, and is added multiple times to complete the online resizing. The difference is that the metadata in a flexbg may be more dispersed.

NVD

Affected Software

21 affected componentsFixes available
Linux Linux kernel<4.19.307
Linux Linux kernel>=4.20<5.4.269
Linux Linux kernel>=5.5<5.10.210
Linux Linux kernel>=5.11<5.15.149
Linux Linux kernel>=5.16<6.1.77
Linux Linux kernel>=6.2<6.6.16
Linux Linux kernel>=6.7<6.7.4
Debian Debian Linux=10.0
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
redhat/kernel<4.19.307
4.19.307
redhat/kernel<5.4.269
5.4.269
redhat/kernel<5.10.210
5.10.210
redhat/kernel<5.15.149
5.15.149
redhat/kernel<6.1.77
6.1.77
redhat/kernel<6.6.16
6.6.16
redhat/kernel<6.7.4
6.7.4
redhat/kernel<6.8
6.8

Event History

Mar 26, 2024
CVE Published
via MITRE·05:19 PM
Data Sourced
via MITRE·05:19 PM
Description
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·09:39 PM
DescriptionSeverityAffected Software
May 7, 2024
Data Sourced
via Launchpad·08:28 PM
Description
Apr 29, 2025
Data Sourced
via Ubuntu·05:36 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-52622?

CVE-2023-52622 has a moderate severity level as it can lead to online resizing failures in ext4 filesystems.

2

How do I fix CVE-2023-52622?

To fix CVE-2023-52622, upgrade the Linux kernel to versions 4.19.307, 5.4.269, 5.10.210, 5.15.149, 6.1.77, 6.6.16, 6.7.4, or 6.8 depending on your distribution.

3

What does CVE-2023-52622 affect?

CVE-2023-52622 affects the ext4 filesystem within the Linux kernel, specifically during online resizing operations.

4

Is CVE-2023-52622 exploitable remotely?

CVE-2023-52622 is not considered remotely exploitable, but it may affect users with permissions to resize ext4 filesystems.

5

What are the affected versions in CVE-2023-52622?

Affected versions for CVE-2023-52622 include specific kernel versions up to 4.19.307, 5.4.269, 5.10.210, 5.15.149, 6.1.77, 6.6.16, 6.7.4, and 6.8.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203