{"id":"CVE-2024-26704","published":"2024-04-03T14:55:02Z","modified":"2026-08-05T11:26:47Z","title":"ext4: fix double-free of blocks due to wrong extents moved_len","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix double-free of blocks due to wrong extents moved_len\n\nIn ext4_move_extents(), moved_len is only updated when all moves are\nsuccessfully executed, and only discards orig_inode and donor_inode\npreallocations when moved_len is not zero. When the loop fails to exit\nafter successfully moving some extents, moved_len is not updated and\nremains at 0, so it does not discard the preallocations.\n\nIf the moved extents overlap with the preallocated extents, the\noverlapped extents are freed twice in ext4_mb_release_inode_pa() and\next4_process_freed_data() (as described in commit 94d7c16cbbbd (\"ext4:\nFix double-free of blocks with EXT4_IOC_MOVE_EXT\")), and bb_free is\nincremented twice. Hence when trim is executed, a zero-division bug is\ntriggered in mb_update_avg_fragment_size() because bb_free is not zero\nand bb_fragments is zero.\n\nTherefore, update move_len after each extent move to avoid the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00345,"percentile":0.20457,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/b4fbb89d722cbb16beaaea234b7230faaaf68c71","tags":[]},{"url":"https://git.kernel.org/stable/c/afbcad9ae7d6d11608399188f03a837451b6b3a1","tags":[]},{"url":"https://git.kernel.org/stable/c/d033a555d9a1cf53dbf3301af7199cc4a4c8f537","tags":[]},{"url":"https://git.kernel.org/stable/c/afba9d11320dad5ce222ac8964caf64b7b4bedb1","tags":[]},{"url":"https://git.kernel.org/stable/c/185eab30486ba3e7bf8b9c2e049c79a06ffd2bc1","tags":[]},{"url":"https://git.kernel.org/stable/c/2883940b19c38d5884c8626483811acf4d7e148f","tags":[]},{"url":"https://git.kernel.org/stable/c/559ddacb90da1d8786dd8ec4fd76bbfa404eaef6","tags":[]},{"url":"https://git.kernel.org/stable/c/55583e899a5357308274601364741a83e78d6ac4","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["x_transferred"]}],"priority":{"score":9.6,"factors":[{"name":"EPSS percentile","points":4.09},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < b4fbb89d722cbb16beaaea234b7230faaaf68c71",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < afbcad9ae7d6d11608399188f03a837451b6b3a1",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < d033a555d9a1cf53dbf3301af7199cc4a4c8f537",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < afba9d11320dad5ce222ac8964caf64b7b4bedb1",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < 185eab30486ba3e7bf8b9c2e049c79a06ffd2bc1",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < 2883940b19c38d5884c8626483811acf4d7e148f",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < 559ddacb90da1d8786dd8ec4fd76bbfa404eaef6",">= fcf6b1b729bcd23f2b49a84fb33ffbb44712ee6a, < 55583e899a5357308274601364741a83e78d6ac4"]},{"vendor":"Linux","product":"Linux","versions":["3.18"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T15:52:39.832740Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-23966","exploited":false,"provenance":"source"}}