{"id":"CVE-2024-56619","aliases":["CVE-2024-56619"],"related":[],"kind":"vulnerability","state":"published","title":"nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nilfs2: se corrige un posible acceso a memoria fuera de los límites en nilfs_find_entry() Syzbot informó que al buscar registros en un directorio donde el i_size del inodo está dañado y tiene un valor grande, puede ocurrir un acceso a memoria fuera del rango de folio/página, o puede detectarse un error de use-after-free si KASAN está habilitado. Esto se debe a que nilfs_last_byte(), que es llamado por nilfs_find_entry() y otros para calcular la cantidad de bytes válidos de datos de directorio en una página a partir de i_size y el índice de página, pierde los 32 bits superiores de la información de tamaño de 64 bits debido a un tipo inadecuado de variable local a la que se asigna el valor de i_size. Esto causó un valor de desplazamiento de bytes grande debido al desbordamiento en el cálculo de la dirección final en la llamada nilfs_find_entry(), lo que resultó en un acceso a memoria que excede el tamaño de folio/página. Solucione este problema cambiando el tipo de la variable local que causa la pérdida de bits de \"unsigned int\" a \"u64\". El valor de retorno de nilfs_last_byte() también es del tipo \"unsigned int\", pero se trunca para no superar PAGE_SIZE y no se produce ninguna pérdida de bits, por lo que no se requiere ningún cambio.","source":"nvd"}],"published":"2024-12-27T14:51:23.516Z","modified":"2026-08-05T11:45:29.225Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"09d6d05579fd46e61abf6e457bb100ff11f3a9d3","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"e3732102a9d638d8627d14fdf7b208462f0520e0","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"48eb6e7404948032bbe811c5affbe39f6b316951","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"5af8366625182f01f6d8465c9a3210574673af57","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"c3afea07477baccdbdec4483f8d5e59d42a3f67f","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e","status":"affected"},{"type":"git","introduced":"2ba466d74ed74f073257f86e61519cb8f8f46184","fixed":"985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.30","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.30","status":"unaffected"},{"type":"semver","introduced":"5.4.287","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.231","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.174","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.120","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.66","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.5","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.30","fixed":"5.4.287"},{"status":"affected","introduced":"5.5","fixed":"5.10.231"},{"status":"affected","introduced":"5.11","fixed":"5.15.174"},{"status":"affected","introduced":"5.16","fixed":"6.1.120"},{"status":"affected","introduced":"6.2","lastAffected":"6.6.66"},{"status":"affected","introduced":"6.7","lastAffected":"6.12.5"},{"status":"affected","version":"6.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/09d6d05579fd46e61abf6e457bb100ff11f3a9d3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e3732102a9d638d8627d14fdf7b208462f0520e0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48eb6e7404948032bbe811c5affbe39f6b316951","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5af8366625182f01f6d8465c9a3210574673af57","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c3afea07477baccdbdec4483f8d5e59d42a3f67f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/31f7b57a77d4c82a34ddcb6ff35b5aa577ef153e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/985ebec4ab0a28bb5910c3b1481a40fbf7f9e61d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-02-11T15:41:59.486Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-56619","url":"https://www.cve.org/CVERecord?id=CVE-2024-56619","licence":"CVE Terms of Use","modified":"2026-08-05T11:45:29.225Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-56619","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56619","licence":"Public domain","modified":"2026-06-17T08:12:34.040Z"}],"updatedAt":"2026-11-25T22:58:50.485Z","epss":{"score":0.00215,"percentile":0.12617,"date":"2026-12-01T12:00:22.000Z"}}