{"id":"CVE-2025-40287","state":"PUBLISHED","title":"exfat: fix improper check of dentry.stream.valid_size","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix improper check of dentry.stream.valid_size\n\nWe found an infinite loop bug in the exFAT file system that can lead to a\nDenial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is\nmalformed, the following system calls — SYS_openat, SYS_ftruncate, and\nSYS_pwrite64 — can cause the kernel to hang.\n\nRoot cause analysis shows that the size validation code in exfat_find()\ndoes not check whether dentry.stream.valid_size is negative. As a result,\nthe system calls mentioned above can succeed and eventually trigger the DoS\nissue.\n\nThis patch adds a check for negative dentry.stream.valid_size to prevent\nthis vulnerability.","publishedAt":"2025-12-06T21:51:13.328Z","updatedAt":"2026-05-11T21:46:25.955Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"6c627bcc1896ba62ec793d0c00da74f3c93ce3ad","versionType":"git"},{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"204b1b02ee018ba52ad2ece21fe3a8643d66a1b2","versionType":"git"},{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"82ebecdc74ff555daf70b811d854b1f32a296bea","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/namei.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.59","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.9","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/namei.c"]}],"references":["https://git.kernel.org/stable/c/6c627bcc1896ba62ec793d0c00da74f3c93ce3ad","https://git.kernel.org/stable/c/204b1b02ee018ba52ad2ece21fe3a8643d66a1b2","https://git.kernel.org/stable/c/82ebecdc74ff555daf70b811d854b1f32a296bea"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40287.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40287","state":"PUBLISHED","datePublished":"2025-12-06T21:51:13.328Z","dateUpdated":"2026-05-11T21:46:25.955Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.184Z"},"containers":{"cna":{"title":"exfat: fix improper check of dentry.stream.valid_size","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix improper check of dentry.stream.valid_size\n\nWe found an infinite loop bug in the exFAT file system that can lead to a\nDenial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is\nmalformed, the following system calls — SYS_openat, SYS_ftruncate, and\nSYS_pwrite64 — can cause the kernel to hang.\n\nRoot cause analysis shows that the size validation code in exfat_find()\ndoes not check whether dentry.stream.valid_size is negative. As a result,\nthe system calls mentioned above can succeed and eventually trigger the DoS\nissue.\n\nThis patch adds a check for negative dentry.stream.valid_size to prevent\nthis vulnerability."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"6c627bcc1896ba62ec793d0c00da74f3c93ce3ad","versionType":"git"},{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"204b1b02ee018ba52ad2ece21fe3a8643d66a1b2","versionType":"git"},{"version":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","status":"affected","lessThan":"82ebecdc74ff555daf70b811d854b1f32a296bea","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/namei.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.12.59","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.9","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/namei.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6c627bcc1896ba62ec793d0c00da74f3c93ce3ad"},{"url":"https://git.kernel.org/stable/c/204b1b02ee018ba52ad2ece21fe3a8643d66a1b2"},{"url":"https://git.kernel.org/stable/c/82ebecdc74ff555daf70b811d854b1f32a296bea"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:46:25.955Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.12.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.17.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}