{"id":"CVE-2024-56619","state":"PUBLISHED","title":"nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()\n\nSyzbot reported that when searching for records in a directory where the\ninode's i_size is corrupted and has a large value, memory access outside\nthe folio/page range may occur, or a use-after-free bug may be detected if\nKASAN is enabled.\n\nThis is because nilfs_last_byte(), which is called by nilfs_find_entry()\nand others to calculate the number of valid bytes of directory data in a\npage from i_size and the page index, loses the upper 32 bits of the 64-bit\nsize information due to an inappropriate type of local variable to which\nthe i_size value is assigned.\n\nThis caused a large byte offset value due to underflow in the end address\ncalculation in the calling nilfs_find_entry(), resulting in memory access\nthat exceeds the folio/page size.\n\nFix this issue by changing the type of the local variable causing the bit\nloss from \"unsigned int\" to \"u64\".  The return value of nilfs_last_byte()\nis also of type \"unsigned int\", but it is truncated so as not to exceed\nPAGE_SIZE and no bit loss occurs, so no change is required.","publishedAt":"2024-12-27T14:51:23.516Z","updatedAt":"2026-08-05T11:45:29.225Z","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":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"09d6d05579fd46e61abf6e457bb100ff11f3a9d3","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"e3732102a9d638d8627d14fdf7b208462f0520e0","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"48eb6e7404948032bbe811c5affbe39f6b316951","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"5af8366625182f01f6d8465c9a3210574673af57","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"c3afea07477baccdbdec4483f8d5e59d42a3f67f","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nilfs2/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.30","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.30","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nilfs2/dir.c"]}],"references":["https://git.kernel.org/stable/c/09d6d05579fd46e61abf6e457bb100ff11f3a9d3","https://git.kernel.org/stable/c/e3732102a9d638d8627d14fdf7b208462f0520e0","https://git.kernel.org/stable/c/48eb6e7404948032bbe811c5affbe39f6b316951","https://git.kernel.org/stable/c/5af8366625182f01f6d8465c9a3210574673af57","https://git.kernel.org/stable/c/c3afea07477baccdbdec4483f8d5e59d42a3f67f","https://git.kernel.org/stable/c/31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e","https://git.kernel.org/stable/c/985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d","https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56619.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56619","state":"PUBLISHED","datePublished":"2024-12-27T14:51:23.516Z","dateUpdated":"2026-08-05T11:45:29.225Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T14:03:06.016Z"},"containers":{"cna":{"title":"nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()\n\nSyzbot reported that when searching for records in a directory where the\ninode's i_size is corrupted and has a large value, memory access outside\nthe folio/page range may occur, or a use-after-free bug may be detected if\nKASAN is enabled.\n\nThis is because nilfs_last_byte(), which is called by nilfs_find_entry()\nand others to calculate the number of valid bytes of directory data in a\npage from i_size and the page index, loses the upper 32 bits of the 64-bit\nsize information due to an inappropriate type of local variable to which\nthe i_size value is assigned.\n\nThis caused a large byte offset value due to underflow in the end address\ncalculation in the calling nilfs_find_entry(), resulting in memory access\nthat exceeds the folio/page size.\n\nFix this issue by changing the type of the local variable causing the bit\nloss from \"unsigned int\" to \"u64\".  The return value of nilfs_last_byte()\nis also of type \"unsigned int\", but it is truncated so as not to exceed\nPAGE_SIZE and no bit loss occurs, so no change is required."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"09d6d05579fd46e61abf6e457bb100ff11f3a9d3","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"e3732102a9d638d8627d14fdf7b208462f0520e0","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"48eb6e7404948032bbe811c5affbe39f6b316951","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"5af8366625182f01f6d8465c9a3210574673af57","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"c3afea07477baccdbdec4483f8d5e59d42a3f67f","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e","versionType":"git"},{"version":"2ba466d74ed74f073257f86e61519cb8f8f46184","status":"affected","lessThan":"985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nilfs2/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.30","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.30","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nilfs2/dir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/09d6d05579fd46e61abf6e457bb100ff11f3a9d3"},{"url":"https://git.kernel.org/stable/c/e3732102a9d638d8627d14fdf7b208462f0520e0"},{"url":"https://git.kernel.org/stable/c/48eb6e7404948032bbe811c5affbe39f6b316951"},{"url":"https://git.kernel.org/stable/c/5af8366625182f01f6d8465c9a3210574673af57"},{"url":"https://git.kernel.org/stable/c/c3afea07477baccdbdec4483f8d5e59d42a3f67f"},{"url":"https://git.kernel.org/stable/c/31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e"},{"url":"https://git.kernel.org/stable/c/985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d"}],"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 - The vulnerability is triggered through local filesystem operations (lookup, unlink, rename, getdents) on a mounted nilfs2 image with a corrupted directory i_size; no network protocol handler is involved.\nAC:L - The truncation and subsequent unsigned underflow are fully deterministic once the crafted i_size is present — a single lookup or readdir on the directory reliably walks past the folio, with no race or unpredictable precondition.\nPR:L - An unprivileged local user can supply and mount a crafted nilfs2 image via removable-media automount (udisks2) and then trigger the OOB with ordinary directory operations; no elevated capability is needed for the triggering syscalls.\nUI:N - Once the attacker-controlled filesystem is mounted, the attacker triggers the flaw entirely on their own with a lookup/readdir/unlink; no separate victim action is required.\nS:U - The out-of-bounds access and its consequences remain within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - nilfs_readdir() emits names and inode numbers read from out-of-bounds kernel memory directly to userspace via dir_emit(), giving a repeatable kernel heap disclosure primitive.\nI:H - A name match in out-of-bounds memory lets nilfs_delete_entry() write dir->inode = 0 and pde->rec_len at an attacker-groomable location outside the folio, an out-of-bounds write usable for control-flow corruption.\nA:H - The unbounded ~4 GB scan limit causes access past the folio into unmapped memory, producing a kernel oops/panic (and KASAN use-after-free reports), as observed by syzbot."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:45:29.225Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"5.4.287"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"5.10.231"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"5.15.174"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"6.1.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"6.6.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"6.12.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.30","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56619","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-11T15:41:59.486282Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-11T15:45:22.383Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:51:08.191Z"}}]}}}