{"schema_version":"1.9.0","id":"CVE-2022-49409","published":"2025-02-26T02:12:32.591Z","modified":"2026-08-12T03:51:45.786918392Z","related":["SUSE-SU-2025:1027-1","SUSE-SU-2025:1176-1","SUSE-SU-2025:1183-1","SUSE-SU-2025:1194-1","SUSE-SU-2025:1241-1","SUSE-SU-2025:1263-1","SUSE-SU-2025:1293-1"],"summary":"ext4: fix bug_on in __es_tree_search","details":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix bug_on in __es_tree_search\n\nHulk Robot reported a BUG_ON:\n==================================================================\nkernel BUG at fs/ext4/extents_status.c:199!\n[...]\nRIP: 0010:ext4_es_end fs/ext4/extents_status.c:199 [inline]\nRIP: 0010:__es_tree_search+0x1e0/0x260 fs/ext4/extents_status.c:217\n[...]\nCall Trace:\n ext4_es_cache_extent+0x109/0x340 fs/ext4/extents_status.c:766\n ext4_cache_extents+0x239/0x2e0 fs/ext4/extents.c:561\n ext4_find_extent+0x6b7/0xa20 fs/ext4/extents.c:964\n ext4_ext_map_blocks+0x16b/0x4b70 fs/ext4/extents.c:4384\n ext4_map_blocks+0xe26/0x19f0 fs/ext4/inode.c:567\n ext4_getblk+0x320/0x4c0 fs/ext4/inode.c:980\n ext4_bread+0x2d/0x170 fs/ext4/inode.c:1031\n ext4_quota_read+0x248/0x320 fs/ext4/super.c:6257\n v2_read_header+0x78/0x110 fs/quota/quota_v2.c:63\n v2_check_quota_file+0x76/0x230 fs/quota/quota_v2.c:82\n vfs_load_quota_inode+0x5d1/0x1530 fs/quota/dquot.c:2368\n dquot_enable+0x28a/0x330 fs/quota/dquot.c:2490\n ext4_quota_enable fs/ext4/super.c:6137 [inline]\n ext4_enable_quotas+0x5d7/0x960 fs/ext4/super.c:6163\n ext4_fill_super+0xa7c9/0xdc00 fs/ext4/super.c:4754\n mount_bdev+0x2e9/0x3b0 fs/super.c:1158\n mount_fs+0x4b/0x1e4 fs/super.c:1261\n[...]\n==================================================================\n\nAbove issue may happen as follows:\n-------------------------------------\next4_fill_super\n ext4_enable_quotas\n  ext4_quota_enable\n   ext4_iget\n    __ext4_iget\n     ext4_ext_check_inode\n      ext4_ext_check\n       __ext4_ext_check\n        ext4_valid_extent_entries\n         Check for overlapping extents does't take effect\n   dquot_enable\n    vfs_load_quota_inode\n     v2_check_quota_file\n      v2_read_header\n       ext4_quota_read\n        ext4_bread\n         ext4_getblk\n          ext4_map_blocks\n           ext4_ext_map_blocks\n            ext4_find_extent\n             ext4_cache_extents\n              ext4_es_cache_extent\n               ext4_es_cache_extent\n                __es_tree_search\n                 ext4_es_end\n                  BUG_ON(es->es_lblk + es->es_len < es->es_lblk)\n\nThe error ext4 extents is as follows:\n0af3 0300 0400 0000 00000000    extent_header\n00000000 0100 0000 12000000     extent1\n00000000 0100 0000 18000000     extent2\n02000000 0400 0000 14000000     extent3\n\nIn the ext4_valid_extent_entries function,\nif prev is 0, no error is returned even if lblock<=prev.\nThis was intended to skip the check on the first extent, but\nin the error image above, prev=0+1-1=0 when checking the second extent,\nso even though lblock<=prev, the function does not return an error.\nAs a result, bug_ON occurs in __es_tree_search and the system panics.\n\nTo solve this problem, we only need to check that:\n1. The lblock of the first extent is not less than 0.\n2. The lblock of the next extent  is not less than\n   the next block of the previous extent.\nThe same applies to extent_idx.","affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5946d089379a35dda0e531710b48fca05446a196"},{"fixed":"d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f"},{"fixed":"4fd58b5cf118d2d9038a0b8c9cc0e43096297686"},{"fixed":"3c617827cd51018bc377bd2954e176920ddbcfad"},{"fixed":"59cf2fabbfe76de29d88dd7ae69858a25735b59f"},{"fixed":"ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a"},{"fixed":"d36f6ed761b53933b0b4126486c10d3da7751e7f"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"4645e4ee32aee01a85bdc03348982a65c65ce216"},{"last_affected":"a1192c0e5d037def6763f3873d3340615c241fe7"},{"last_affected":"ae21dda05193c441bde106a4bbf88c185a68fbed"},{"last_affected":"ea214c946ee77588c4313be3e9951edd25d6b270"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3.2.55"},{"fixed":"3.3"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3.4.76"},{"fixed":"3.5"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3.10.26"},{"fixed":"3.11"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3.12.7"},{"fixed":"3.13"}]}],"versions":["v3.2.54","v3.12","v3.12.6","v3.10.25","v3.4.75","v3.2.53","v3.12.5","v3.10.24","v3.4.74","v3.12.4","v3.10.23","v3.4.73","v3.4.72","v3.10.22","v3.12.3","v3.12.2","v3.10.21","v3.4.71","v3.12.1","v3.10.20","v3.4.70","v3.2.52","v3.10.19","v3.4.69","v3.12-rc7","v3.12-rc3","v3.12-rc6","v3.10.18","v3.4.68","v3.12-rc1","v3.12-rc5","v3.11","v3.10.17","v3.4.67","v3.12-rc2","v3.12-rc4","v3.2.51","v3.4.66","v3.10.16","v3.10.15","v3.4.65","v3.10.14","v3.4.64","v3.10.13","v3.4.63","v3.10.12","v3.4.62","v3.10.11","v3.4.61","v3.2.50","v3.11-rc7","v3.10.10","v3.4.60","v3.11-rc2","v3.11-rc5","v3.11-rc1","v3.11-rc3","v3.11-rc4","v3.4.59","v3.10.9","v3.11-rc6","v3.10.8","v3.10.7","v3.4.58","v3.10.6","v3.4.57","v3.10.5","v3.4.56","v3.10-rc2","v3.10.4","v3.4.55","v3.2.49","v3.10.3","v3.4.54","v3.2.48","v3.10.2","v3.10","v3.10.1","v3.4.53","v3.4.52","v3.4.51","v3.10-rc7","v3.2.47","v3.10-rc6","v3.10-rc1","v3.4.50","v3.10-rc5","v3.10-rc3","v3.4.49","v3.2.46","v3.10-rc4","v3.4.48","v3.4.47","v3.2.45","v3.9","v3.4.46","v3.4.45","v3.2.44","v3.4.44","v3.4.43","v3.9-rc2","v3.9-rc7","v3.4.42","v3.9-rc8","v3.4.41","v3.2.43","v3.9-rc3","v3.9-rc6","v3.9-rc5","v3.4.40","v3.4.39","v3.9-rc4","v3.9-rc1","v3.2.42","v3.8","v3.4.38","v3.4.37","v3.2.41","v3.4.36","v3.2.40","v3.4.35","v3.2.39","v3.4.34","v3.4.33","v3.8-rc7","v3.4.32","v3.8-rc6","v3.2.38","v3.8-rc5","v3.4.31","v3.4.30","v3.8-rc2","v3.4.29","v3.2.37","v3.4.28","v3.8-rc1","v3.8-rc3","v3.8-rc4","v3.4.27","v3.4.26","v3.4.25","v3.2.36","v3.7","v3.4.24","v3.2.35","v3.4.23","v3.7-rc1","v3.6","v3.7-rc6","v3.7-rc7","v3.4.22","v3.7-rc3","v3.7-rc8","v3.2.34","v3.4.21","v3.4.20","v3.7-rc2","v3.4.19","v3.7-rc4","v3.7-rc5","v3.4.18","v3.2.33","v3.4.17","v3.4.16","v3.2.32","v3.4.15","v3.4.14","v3.2.31","v3.4.13","v3.2.30","v3.6-rc7","v3.4.12","v3.6-rc1","v3.5-rc3","v3.4.11","v3.6-rc6","v3.6-rc5","v3.5","v3.6-rc3","v3.6-rc4","v3.2.29","v3.6-rc2","v3.4.10","v3.2.28","v3.4-rc4","v3.4.9","v3.2.27","v3.4.8","v3.2.26","v3.4.7","v3.2.25","v3.2.24","v3.4.6","v3.5-rc7","v3.2.23","v3.5-rc5","v3.5-rc6","v3.4.5","v3.4.4","v3.5-rc2","v3.2.22","v3.5-rc1","v3.5-rc4","v3.2.21","v3.4","v3.4.3","v3.2.20","v3.4.2","v3.2.19","v3.4.1","v3.2.18","v3.4-rc2","v3.4-rc1","v3.2.17","v3.4-rc7","v3.4-rc6","v3.4-rc3","v3.4-rc5","v3.2.16","v3.2.15","v3.3","v3.2.14","v3.2.13","v3.3-rc6","v3.3-rc3","v3.2.12","v3.3-rc7","v3.2.11","v3.3-rc2","v3.3-rc5","v3.2","v3.2.10","v3.3-rc4","v3.2.9","v3.3-rc1","v3.2.8","v3.2.7","v3.2.6","v3.2.5","v3.2.4","v3.2.3","v3.2.2","v3.2.1","v3.2-rc4","v3.2-rc7","v3.2-rc6","v3.2-rc5","v3.2-rc3","v3.1","v3.2-rc2","v3.2-rc1","v3.1-rc1","v3.1-rc9","v3.1-rc8","v3.1-rc10","v3.1-rc7","v3.1-rc3","v3.1-rc2","v3.1-rc4","v3.1-rc5","v3.0","v3.1-rc6","v3.0-rc7","v3.0-rc4","v3.0-rc6","v3.0-rc5","v3.0-rc3","v3.0-rc1","v2.6.39","v3.0-rc2","v2.6.38","v2.6.39-rc2","v2.6.39-rc7","v2.6.39-rc5","v2.6.39-rc1","v2.6.38-rc7","v2.6.39-rc6","v2.6.39-rc4","v2.6.39-rc3","v2.6.37","v2.6.38-rc1","v2.6.38-rc8","v2.6.38-rc2","v2.6.38-rc6","v2.6.38-rc5","v2.6.38-rc4","v2.6.38-rc3","v2.6.37-rc4","v2.6.37-rc2","v2.6.36","v2.6.37-rc5","v2.6.37-rc8","v2.6.37-rc7","v2.6.37-rc6","v2.6.37-rc1","v2.6.37-rc3","v2.6.36-rc6","v2.6.35-rc4","v2.6.36-rc8","v2.6.35","v2.6.36-rc7","v2.6.36-rc3","v2.6.36-rc5","v2.6.36-rc4","v2.6.36-rc2","v2.6.36-rc1","v2.6.35-rc5","v2.6.35-rc6","v2.6.34","v2.6.35-rc3","v2.6.35-rc1","v2.6.35-rc2","v2.6.34-rc7","v2.6.34-rc6","v2.6.34-rc5","v2.6.34-rc4","v2.6.34-rc3","v2.6.34-rc2","v2.6.34-rc1","v2.6.33","v2.6.33-rc6","v2.6.33-rc8","v2.6.33-rc4","v2.6.33-rc5","v2.6.33-rc3","v2.6.33-rc7","v2.6.33-rc2","v2.6.32","v2.6.33-rc1","v2.6.32-rc8","v2.6.32-rc7","v2.6.32-rc6","v2.6.31","v2.6.32-rc5","v2.6.32-rc4","v2.6.32-rc2","v2.6.32-rc1","v2.6.32-rc3","v2.6.31-rc9","v2.6.31-rc1","v2.6.31-rc7","v2.6.31-rc8","v2.6.31-rc6","v2.6.30-rc6","v2.6.30","v2.6.31-rc4","v2.6.31-rc5","v2.6.31-rc3","v2.6.31-rc2","v2.6.30-rc7","v2.6.30-rc8","v2.6.30-rc5","v2.6.30-rc3","v2.6.30-rc4","v2.6.30-rc1","v2.6.30-rc2","v2.6.29","v2.6.29-rc8","v2.6.29-rc7","v2.6.29-rc5","v2.6.29-rc1","v2.6.29-rc6","v2.6.29-rc4","v2.6.29-rc3","v2.6.29-rc2","v2.6.28","v2.6.28-rc7","v2.6.28-rc9","v2.6.28-rc8","v2.6.28-rc6","v2.6.28-rc5","v2.6.28-rc4","v2.6.28-rc2","v2.6.28-rc3","v2.6.28-rc1","v2.6.27","v2.6.27-rc7","v2.6.27-rc9","v2.6.27-rc8","v2.6.27-rc5","v2.6.27-rc6","v2.6.27-rc4","v2.6.27-rc1","v2.6.27-rc3","v2.6.27-rc2","v2.6.26","v2.6.26-rc9","v2.6.26-rc8","v2.6.26-rc3","v2.6.26-rc7","v2.6.26-rc6","v2.6.26-rc5","v2.6.26-rc4","v2.6.26-rc2","v2.6.26-rc1","v2.6.25","v2.6.25-rc7","v2.6.25-rc9","v2.6.25-rc8","v2.6.25-rc6","v2.6.25-rc5","v2.6.25-rc3","v2.6.25-rc4","v2.6.24","v2.6.25-rc2","v2.6.25-rc1","v2.6.24-rc8","v2.6.24-rc7","v2.6.24-rc6","v2.6.24-rc5","v2.6.24-rc4","v2.6.24-rc3","v2.6.24-rc2","v2.6.24-rc1","v2.6.23","v2.6.23-rc9","v2.6.23-rc8","v2.6.23-rc5","v2.6.23-rc7","v2.6.23-rc6","v2.6.23-rc4","v2.6.23-rc3","v2.6.23-rc2","v2.6.23-rc1","v2.6.22","v2.6.22-rc7","v2.6.22-rc6","v2.6.22-rc5","v2.6.22-rc4","v2.6.22-rc3","v2.6.22-rc2","v2.6.22-rc1","v2.6.21","v2.6.21-rc7","v2.6.21-rc6","v2.6.21-rc5","v2.6.21-rc4","v2.6.21-rc3","v2.6.21-rc2","v2.6.21-rc1","v2.6.20-rc7","v2.6.20-rc6","v2.6.20-rc5","v2.6.20-rc4","v2.6.20-rc3","v2.6.20-rc1","v2.6.20-rc2","v2.6.19-rc2","v2.6.18","v2.6.19-rc1","v2.6.18-rc6","v2.6.18-rc5","v2.6.18-rc3","v2.6.18-rc2","v2.6.18-rc1","v2.6.17","v2.6.17-rc4","v2.6.17-rc6","v2.6.17-rc5","v2.6.17-rc3","v2.6.17-rc2","v2.6.17-rc1","v2.6.16","v2.6.16-rc6","v2.6.16-rc4","v2.6.16-rc5","v2.6.16-rc3","v2.6.16-rc2","v2.6.16-rc1","v2.6.15-rc7","v2.6.15-rc5","v2.6.15-rc4","v2.6.15-rc2","v2.6.15-rc1","v2.6.14-rc3","v2.6.14-rc2","v2.6.14-rc1","v2.6.13","v2.6.13-rc7","v2.6.13-rc6","v2.6.13-rc5","v2.6.13-rc3","v2.6.13-rc4","v2.6.13-rc2","v2.6.13-rc1","v2.6.12-rc4","v2.6.12-rc3","v2.6.12-rc2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49409.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.13.0"},{"fixed":"5.4.277"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.121"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.46"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.17.14"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.18.0"},{"fixed":"5.18.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49409.json"}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3c617827cd51018bc377bd2954e176920ddbcfad"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4fd58b5cf118d2d9038a0b8c9cc0e43096297686"},{"type":"WEB","url":"https://git.kernel.org/stable/c/59cf2fabbfe76de29d88dd7ae69858a25735b59f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d0083459e2b6b07ebd78bea2fe684a19cc0f3d0f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d36f6ed761b53933b0b4126486c10d3da7751e7f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49409.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49409"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49409.json"}}