{"id":"CVE-2022-50286","summary":"ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline","details":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline\n\nWhen converting files with inline data to extents, delayed allocations\nmade on a file system created with both the bigalloc and inline options\ncan result in invalid extent status cache content, incorrect reserved\ncluster counts, kernel memory leaks, and potential kernel panics.\n\nWith bigalloc, the code that determines whether a block must be\ndelayed allocated searches the extent tree to see if that block maps\nto a previously allocated cluster.  If not, the block is delayed\nallocated, and otherwise, it isn't.  However, if the inline option is\nalso used, and if the file containing the block is marked as able to\nstore data inline, there isn't a valid extent tree associated with\nthe file.  The current code in ext4_clu_mapped() calls\next4_find_extent() to search the non-existent tree for a previously\nallocated cluster anyway, which typically finds nothing, as desired.\nHowever, a side effect of the search can be to cache invalid content\nfrom the non-existent tree (garbage) in the extent status tree,\nincluding bogus entries in the pending reservation tree.\n\nTo fix this, avoid searching the extent tree when allocating blocks\nfor bigalloc + inline files that are being converted from inline to\nextent mapped.","modified":"2026-03-20T11:47:22.401199Z","published":"2025-09-15T14:21:22.489Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50286.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/131294c35ed6f777bd4e79d42af13b5c41bf2775"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6f4200ec76a0d31200c308ec5a71c68df5417004"},{"type":"WEB","url":"https://git.kernel.org/stable/c/81b915181c630ee1cffa052e52874fe4e1ba91ac"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9404839e0c9db5a517ea83c0ca3388b39d105fdf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c0c8edbc8abbe8f16d80a1d794d1ba2c12b6f193"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d440d6427a5e3a877c1c259b8d2b216ddb65e185"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f83391339d8493b9ff24167516aaa5a5e88d8f81"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50286.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50286"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d40e09f701cf7a44e595a558b067b2b4f67fbf87"},{"fixed":"f83391339d8493b9ff24167516aaa5a5e88d8f81"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6"},{"fixed":"6f4200ec76a0d31200c308ec5a71c68df5417004"},{"fixed":"9404839e0c9db5a517ea83c0ca3388b39d105fdf"},{"fixed":"d440d6427a5e3a877c1c259b8d2b216ddb65e185"},{"fixed":"c0c8edbc8abbe8f16d80a1d794d1ba2c12b6f193"},{"fixed":"81b915181c630ee1cffa052e52874fe4e1ba91ac"},{"fixed":"131294c35ed6f777bd4e79d42af13b5c41bf2775"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50286.json"}}],"schema_version":"1.7.5"}