{"id":"CVE-2024-42257","summary":"ext4: use memtostr_pad() for s_volume_name","details":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: use memtostr_pad() for s_volume_name\n\nAs with the other strings in struct ext4_super_block, s_volume_name is\nnot NUL terminated. The other strings were marked in commit 072ebb3bffe6\n(\"ext4: add nonstring annotations to ext4.h\"). Using strscpy() isn't\nthe right replacement for strncpy(); it should use memtostr_pad()\ninstead.","modified":"2026-04-02T12:17:54.431621Z","published":"2024-08-08T08:50:37.231Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42257.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/4378be89ddb7de88d984b67ecfd6191686c42817"},{"type":"WEB","url":"https://git.kernel.org/stable/c/be27cd64461c45a6088a91a04eba5cd44e1767ef"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42257.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42257"},{"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":"744a56389f7398f286231e062c2e63f0de01bcc6"},{"fixed":"4378be89ddb7de88d984b67ecfd6191686c42817"},{"fixed":"be27cd64461c45a6088a91a04eba5cd44e1767ef"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42257.json"}}],"schema_version":"1.7.5"}