ext4: allow ext4_get_group_info() to fail
In the Linux kernel, the following vulnerability has been resolved: ext4: allow ext4_get_group_info() to fail Previously, ext4_get_group_info() would treat an invalid group number as BUG(), since in theory it should never happen. However, if a malicious attaker (or fuzzer) modifies the superblock via the block device while it is the file system is mounted, it is possible for s_first_data_block to get set to a very large number. In that case, when calculating the block group of some block number (such as the starting block of a preallocation region), could result in an underflow and very large block group number. Then the BUG_ON check in ext4_get_group_info() would fire, resutling in a denial of service attack that can be triggered by root or someone with write access to the block device. For a quality of implementation perspective, it's best that even if the system administrator does something that they shouldn't, that it will not trigger a BUG. So instead of BUG'ing, ext4_get_group_info() will call ext4_error and return NULL. We also add fallback code in all of the callers of ext4_get_group_info() that it might NULL. Also, since ext4_get_group_info() was already borderline to be an inline function, un-inline it. The results in a next reduction of the compiled text size of ext4 by roughly 2k.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.181, 5.15.113, 6.1.30, 6.3.4
- CVEs
- CVE-2023-53503
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 03:31 UTC · Revision 1
Source evidence
In the Linux kernel, the following vulnerability has been resolved: ext4: allow ext4_get_group_info() to fail Previously, ext4_get_group_info() would treat an invalid group number as BUG(), since in theory it should never happen. However, if a malicious attaker (or fuzzer) modifies the superblock via the block device while it is the file system is mounted, it is possible for s_first_data_block to get set to a very large number. In that case, when calculating the block group of some block number (such as the starting block of a preallocation region), could result in an underflow and very large block group number. Then the BUG_ON check in ext4_get_group_info() would fire, resutling in a denial of service attack that can be triggered by root or someone with write access to the block device. For a quality of implementation perspective, it's best that even if the system administrator does something that they shouldn't, that it will not trigger a BUG. So instead of BUG'ing, ext4_get_group_info() will call ext4_error and return NULL. We also add fallback code in all of the callers of ext4_get_group_info() that it might NULL. Also, since ext4_get_group_info() was already borderline to be an inline function, un-inline it. The results in a next reduction of the compiled text size of ext4 by roughly 2k.
osv:CVE-2023-53503
Kernel
Fixed versions: 5.10.181, 5.15.113, 6.1.30, 6.3.4
Complete source record
{
"id": "d431f43c8292843ce9408031e55811e3ac7bafed4cc0a7194b90034da5bbaba5",
"url": "https://osv.dev/vulnerability/CVE-2023-53503",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ext4: allow ext4_get_group_info() to fail",
"summary": "In the Linux kernel, the following vulnerability has been resolved: ext4: allow ext4_get_group_info() to fail Previously, ext4_get_group_info() would treat an invalid group number as BUG(), since in theory it should never happen. However, if a malicious attaker (or fuzzer) modifies the superblock via the block device while it is the file system is mounted, it is possible for s_first_data_block to get set to a very large number. In that case, when calculating the block group of some block number (such as the starting block of a preallocation region), could result in an underflow and very large block group number. Then the BUG_ON check in ext4_get_group_info() would fire, resutling in a denial of service attack that can be triggered by root or someone with write access to the block device. For a quality of implementation perspective, it's best that even if the system administrator does something that they shouldn't, that it will not trigger a BUG. So instead of BUG'ing, ext4_get_group_info() will call ext4_error and return NULL. We also add fallback code in all of the callers of ext4_get_group_info() that it might NULL. Also, since ext4_get_group_info() was already borderline to be an inline function, un-inline it. The results in a next reduction of the compiled text size of ext4 by roughly 2k.",
"evidence": "osv:CVE-2023-53503",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.181",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.113",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.30",
"evidence": "/affected/1/ranges"
},
{
"value": "6.3.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2023-53503",
"aliases": [
"CVE-2023-53503"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "2f2e09eb15849562aede80ed007658e4504ded26"
},
{
"fixed": "100c0ad6c04597fefeaaba2bb1827cc015d95067"
},
{
"fixed": "620a3c28221bb219b81bc0bffd065cc187494302"
},
{
"fixed": "b4319e457d6e3fb33e443efeaf4634fc36e8a9ed"
},
{
"fixed": "31668cebf45adfb6283e465e641c4f5a21b07afa"
},
{
"fixed": "5354b2af34064a4579be8bc0e2f15a7b70f14b5f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53503.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.11.0"
},
{
"fixed": "5.10.181"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.113"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.30"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.3.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53503.json"
}
}
],
"modified": "2026-10-28T02:30:49.645255378Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/100c0ad6c04597fefeaaba2bb1827cc015d95067",
"https://git.kernel.org/stable/c/31668cebf45adfb6283e465e641c4f5a21b07afa",
"https://git.kernel.org/stable/c/5354b2af34064a4579be8bc0e2f15a7b70f14b5f",
"https://git.kernel.org/stable/c/620a3c28221bb219b81bc0bffd065cc187494302",
"https://git.kernel.org/stable/c/b4319e457d6e3fb33e443efeaf4634fc36e8a9ed",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53503.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-53503",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53503.json"
}
},
"related_cves": [
{
"value": "CVE-2023-53503",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 517776,
"published_at": "2025-10-01T11:45:54.052+00:00"
}