{"id":"CVE-2024-42299","state":"PUBLISHED","title":"fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: Update log->page_{mask,bits} if log->page_size changed\n\nIf an NTFS file system is mounted to another system with different\nPAGE_SIZE from the original system, log->page_size will change in\nlog_replay(), but log->page_{mask,bits} don't change correspondingly.\nThis will cause a panic because \"u32 bytes = log->page_size - page_off\"\nwill get a negative value in the later read_log_page().","publishedAt":"2024-08-17T09:09:06.570Z","updatedAt":"2026-08-05T11:36:28.790Z","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":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"0484adcb5fbcadd9ba0fd4485c42630f72e97da9","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"b90ceffdc975502bc085ce8e79c6adeff05f9521","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"2cac0df3324b5e287d8020bc0708f7d2dec88a6f","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"0a4ae2644e2a3b3b219aad9639fb2b0691d08420","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"2fef55d8f78383c8e6d6d4c014b9597375132696","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs3/fslog.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.165","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.103","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.44","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.3","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs3/fslog.c"]}],"references":["https://git.kernel.org/stable/c/0484adcb5fbcadd9ba0fd4485c42630f72e97da9","https://git.kernel.org/stable/c/b90ceffdc975502bc085ce8e79c6adeff05f9521","https://git.kernel.org/stable/c/2cac0df3324b5e287d8020bc0708f7d2dec88a6f","https://git.kernel.org/stable/c/0a4ae2644e2a3b3b219aad9639fb2b0691d08420","https://git.kernel.org/stable/c/2fef55d8f78383c8e6d6d4c014b9597375132696","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:47.831Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/42xxx/CVE-2024-42299.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-42299","state":"PUBLISHED","datePublished":"2024-08-17T09:09:06.570Z","dateUpdated":"2026-08-05T11:36:28.790Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-30T07:40:12.270Z"},"containers":{"cna":{"title":"fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: Update log->page_{mask,bits} if log->page_size changed\n\nIf an NTFS file system is mounted to another system with different\nPAGE_SIZE from the original system, log->page_size will change in\nlog_replay(), but log->page_{mask,bits} don't change correspondingly.\nThis will cause a panic because \"u32 bytes = log->page_size - page_off\"\nwill get a negative value in the later read_log_page()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"0484adcb5fbcadd9ba0fd4485c42630f72e97da9","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"b90ceffdc975502bc085ce8e79c6adeff05f9521","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"2cac0df3324b5e287d8020bc0708f7d2dec88a6f","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"0a4ae2644e2a3b3b219aad9639fb2b0691d08420","versionType":"git"},{"version":"b46acd6a6a627d876898e1c84d3f84902264b445","status":"affected","lessThan":"2fef55d8f78383c8e6d6d4c014b9597375132696","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs3/fslog.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.165","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.103","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.44","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.3","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs3/fslog.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0484adcb5fbcadd9ba0fd4485c42630f72e97da9"},{"url":"https://git.kernel.org/stable/c/b90ceffdc975502bc085ce8e79c6adeff05f9521"},{"url":"https://git.kernel.org/stable/c/2cac0df3324b5e287d8020bc0708f7d2dec88a6f"},{"url":"https://git.kernel.org/stable/c/0a4ae2644e2a3b3b219aad9639fb2b0691d08420"},{"url":"https://git.kernel.org/stable/c/2fef55d8f78383c8e6d6d4c014b9597375132696"}],"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 corruption is triggered during ntfs3 mount-time journal replay of an attacker-supplied NTFS image, delivered via removable media, a loop device, or an image file — there is no network path to `log_replay()`.\nAC:L - Triggering is fully deterministic with no race: the attacker simply sets `sys_page_size`/`page_size` in the $LogFile restart header to a value differing from the host `PAGE_SIZE`, and the stale `page_mask`/`page_bits`/`one_page_buf` mismatch corrupts memory on every mount.\nPR:L - NTFS volumes on removable media are routinely auto-mounted by desktop/kiosk automounters (udisks2) with the in-kernel ntfs3 driver, so an unprivileged local user who supplies the media or image reaches the vulnerable replay path without administrator action.\nUI:N - Automount performs the mount and journal replay automatically when the media is attached; no victim action such as opening a file is required for the overflow to occur.\nS:U - The heap overflow and out-of-bounds reads are confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - With a stale mask larger than the new page size, `bytes = log->page_size - page_off` underflows and `memcpy()` reads up to ~4 GiB past `one_page_buf` into the caller's buffer, and the mismatched `page_off`/`bytes` also expose adjacent slab contents to the log parser — an unbounded kernel heap disclosure.\nI:H - When the on-disk page size exceeds the host's, `ntfs_read_run_nb()` writes `log->page_size` bytes (e.g. 64 KiB) of fully attacker-controlled disk data into the 4 KiB `one_page_buf`, a controlled-length, controlled-content linear heap overflow usable for object corruption and control-flow hijack.\nA:H - The commit message documents an outright kernel panic from the negative-length read, and a ~60 KiB slab overwrite or ~4 GiB wild memcpy reliably oopses the machine at mount time."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:36:28.790Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.165"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.103"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.10.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.11"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-42299","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:10:38.451073Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-12T17:33:28.553Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:03:59.953Z"}}]}}}