{"id":"CVE-2024-56619","summary":"nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()","details":"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.","modified":"2026-04-02T12:24:55.363007Z","published":"2024-12-27T14:51:23.516Z","related":["MGASA-2025-0030","MGASA-2025-0032","SUSE-SU-2025:0152-1","SUSE-SU-2025:0201-1","SUSE-SU-2025:0201-2","SUSE-SU-2025:0203-1","SUSE-SU-2025:0229-1","SUSE-SU-2025:0231-1","SUSE-SU-2025:0289-1","SUSE-SU-2025:0428-1","SUSE-SU-2025:0499-1","SUSE-SU-2025:0557-1","SUSE-SU-2025:20165-1","SUSE-SU-2025:20166-1","SUSE-SU-2025:20248-1","SUSE-SU-2025:20249-1","USN-7379-2","USN-7380-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56619.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/09d6d05579fd46e61abf6e457bb100ff11f3a9d3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/48eb6e7404948032bbe811c5affbe39f6b316951"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5af8366625182f01f6d8465c9a3210574673af57"},{"type":"WEB","url":"https://git.kernel.org/stable/c/985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c3afea07477baccdbdec4483f8d5e59d42a3f67f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e3732102a9d638d8627d14fdf7b208462f0520e0"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/56xxx/CVE-2024-56619.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56619"},{"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":"2ba466d74ed74f073257f86e61519cb8f8f46184"},{"fixed":"09d6d05579fd46e61abf6e457bb100ff11f3a9d3"},{"fixed":"e3732102a9d638d8627d14fdf7b208462f0520e0"},{"fixed":"48eb6e7404948032bbe811c5affbe39f6b316951"},{"fixed":"5af8366625182f01f6d8465c9a3210574673af57"},{"fixed":"c3afea07477baccdbdec4483f8d5e59d42a3f67f"},{"fixed":"31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e"},{"fixed":"985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56619.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}