{"id":"CVE-2024-41015","state":"PUBLISHED","title":"ocfs2: add bounds checking to ocfs2_check_dir_entry()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: add bounds checking to ocfs2_check_dir_entry()\n\nThis adds sanity checks for ocfs2_dir_entry to make sure all members of\nocfs2_dir_entry don't stray beyond valid memory region.","publishedAt":"2024-07-29T06:37:01.651Z","updatedAt":"2026-08-05T11:34:41.032Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"13d38c00df97289e6fba2e54193959293fd910d2","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"564d23cc5b216211e1694d53f7e45959396874d0","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"77495e5da5cb110a8fed27b052c77853fe282176","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"53de17ad01cb5f6f8426f597e9d5c87d4cf53bb7","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"fd65685594ee707cbf3ddf22ebb73697786ac114","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"e05a24289db90f76ff606086aadd62d068a88dcd","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"624b380074f0dc209fb8706db3295c735079f34c","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"edb2e67dd4626b06fd7eb37252d5067912e78d59","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"255547c6bb8940a97eea94ef9d464ea5967763fb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.24","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.24","versionType":"semver"},{"version":"4.19.319","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.281","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.223","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.164","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.102","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.43","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.12","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10.2","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dir.c"]}],"references":["https://git.kernel.org/stable/c/13d38c00df97289e6fba2e54193959293fd910d2","https://git.kernel.org/stable/c/564d23cc5b216211e1694d53f7e45959396874d0","https://git.kernel.org/stable/c/77495e5da5cb110a8fed27b052c77853fe282176","https://git.kernel.org/stable/c/53de17ad01cb5f6f8426f597e9d5c87d4cf53bb7","https://git.kernel.org/stable/c/fd65685594ee707cbf3ddf22ebb73697786ac114","https://git.kernel.org/stable/c/e05a24289db90f76ff606086aadd62d068a88dcd","https://git.kernel.org/stable/c/624b380074f0dc209fb8706db3295c735079f34c","https://git.kernel.org/stable/c/edb2e67dd4626b06fd7eb37252d5067912e78d59","https://git.kernel.org/stable/c/255547c6bb8940a97eea94ef9d464ea5967763fb","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/41xxx/CVE-2024-41015.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-41015","state":"PUBLISHED","datePublished":"2024-07-29T06:37:01.651Z","dateUpdated":"2026-08-05T11:34:41.032Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-12T12:17:45.612Z"},"containers":{"cna":{"title":"ocfs2: add bounds checking to ocfs2_check_dir_entry()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: add bounds checking to ocfs2_check_dir_entry()\n\nThis adds sanity checks for ocfs2_dir_entry to make sure all members of\nocfs2_dir_entry don't stray beyond valid memory region."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"13d38c00df97289e6fba2e54193959293fd910d2","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"564d23cc5b216211e1694d53f7e45959396874d0","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"77495e5da5cb110a8fed27b052c77853fe282176","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"53de17ad01cb5f6f8426f597e9d5c87d4cf53bb7","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"fd65685594ee707cbf3ddf22ebb73697786ac114","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"e05a24289db90f76ff606086aadd62d068a88dcd","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"624b380074f0dc209fb8706db3295c735079f34c","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"edb2e67dd4626b06fd7eb37252d5067912e78d59","versionType":"git"},{"version":"23193e513d1cd69411469f028d56fd175d4a6b07","status":"affected","lessThan":"255547c6bb8940a97eea94ef9d464ea5967763fb","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.24","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.24","versionType":"semver"},{"version":"4.19.319","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.281","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.223","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.164","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.102","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.43","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.12","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10.2","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/dir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/13d38c00df97289e6fba2e54193959293fd910d2"},{"url":"https://git.kernel.org/stable/c/564d23cc5b216211e1694d53f7e45959396874d0"},{"url":"https://git.kernel.org/stable/c/77495e5da5cb110a8fed27b052c77853fe282176"},{"url":"https://git.kernel.org/stable/c/53de17ad01cb5f6f8426f597e9d5c87d4cf53bb7"},{"url":"https://git.kernel.org/stable/c/fd65685594ee707cbf3ddf22ebb73697786ac114"},{"url":"https://git.kernel.org/stable/c/e05a24289db90f76ff606086aadd62d068a88dcd"},{"url":"https://git.kernel.org/stable/c/624b380074f0dc209fb8706db3295c735079f34c"},{"url":"https://git.kernel.org/stable/c/edb2e67dd4626b06fd7eb37252d5067912e78d59"},{"url":"https://git.kernel.org/stable/c/255547c6bb8940a97eea94ef9d464ea5967763fb"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Reaching `ocfs2_check_dir_entry()`/`ocfs2_search_dirblock()` requires a crafted OCFS2 volume to be present locally (loop-mounted image file or an attached block device/USB stick) and then touched with an ordinary path-walk or `getdents()`; ocfs2 directory parsing is not exposed by any remote protocol handler.\nAC:L - The attacker authors the on-disk dirents, and `rec_len` is an unvalidated `__le16` that the scan loop only rejects when zero, so `de_buf` can be steered to any byte offset (including `b_data + blocksize - 1`) and the out-of-bounds header read in `ocfs2_match()` fires deterministically on the first `stat()`/`readdir()` — no race, no memory-layout luck, and no non-default kernel config.\nPR:L - An unprivileged local user supplies the poisoned image (a file for loop-mount, or removable media handled by udisks2/systemd automount) and then triggers the path with plain unprivileged `open()`/`stat()`/`readdir()`/`rename()` on the crafted directory; the attacker needs no capability of their own.\nUI:N - On the common desktop/kiosk/embedded deployment the attacker-supplied device is mounted automatically by the automount daemon, and the attacking process itself then issues the syscall that walks the malformed directory — no deliberate action by another user is required.\nS:U - The out-of-bounds accesses and the resulting metadata corruption stay inside the kernel's own memory and security authority; no VM, IOMMU, container, or sandbox boundary is crossed.\nC:H - `ocfs2_match()` reads `de->inode`, `de->name_len` and `memcmp()`s the name up to ~12 bytes past the end of the page-cache block buffer, and `ocfs2_check_dir_entry()`'s `mlog(ML_ERROR, …)` then prints that out-of-bounds `de->inode` verbatim into the kernel log, while the match/no-match result forms a byte-granular oracle over adjacent kernel memory; for inline dirs the missing `i_size` bound also lets `dir_emit()` hand bytes from beyond the valid region to userspace.\nI:H - Dirents that stray outside the valid region pass validation and are then written in place — `le16_add_cpu(&pde->rec_len, …)` and `de->inode = 0` in `__ocfs2_delete_entry()`, `de->inode`/`file_type` in `ocfs2_update_entry()`, and `de1->rec_len`/`de->name_len`/`memcpy(de->name, name, namelen)` in `__ocfs2_add_entry()` — through unaligned pointers whose offsets are derived from out-of-bounds-read `rec_len`/`name_len`, giving attacker-controlled writes outside the region the code believes it owns.\nA:H - The read past a block buffer that can be a full page reliably trips KASAN and can fault on an unmapped adjacent page (DEBUG_PAGEALLOC, highmem/kmap, sparsemem section edge), producing an oops, and the `BUG_ON((char *)de >= (size + data_start))` in `__ocfs2_add_entry()` becomes reachable for inline-data dirs because the old check bounded against the block rather than `i_size` — a kernel BUG taken with the journal handle and inode locks held; the trigger is repeatable on demand."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:34:41.032Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"4.19.319"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"5.4.281"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"5.10.223"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"5.15.164"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.1.102"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.6.43"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.9.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.10.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.11"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/13d38c00df97289e6fba2e54193959293fd910d2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/564d23cc5b216211e1694d53f7e45959396874d0","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/77495e5da5cb110a8fed27b052c77853fe282176","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/53de17ad01cb5f6f8426f597e9d5c87d4cf53bb7","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/fd65685594ee707cbf3ddf22ebb73697786ac114","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e05a24289db90f76ff606086aadd62d068a88dcd","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/624b380074f0dc209fb8706db3295c735079f34c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/edb2e67dd4626b06fd7eb37252d5067912e78d59","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/255547c6bb8940a97eea94ef9d464ea5967763fb","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:59:17.542Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-41015","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:24:46.545116Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:05.831Z"}}]}}}