{"id":"CVE-2026-99863","aliases":["CVE-2026-99863"],"related":[],"kind":"vulnerability","state":"published","title":"fs/ntfs3: bound CreateAttribute asize against record_size in do_action","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: bound CreateAttribute asize against record_size in do_action\n\nIn do_action()'s CreateAttribute case (fslog.c:3286), attr2 points into\nthe on-disk log record and asize = le32_to_cpu(attr2->size) is therefore\nattacker-controlled on mount.  The guard bounds asize only against the\nlog record itself,\n\n\tAdd2Ptr(attr2, asize) > Add2Ptr(lrh, rec_len)\n\nwhere rec_len is the client data length, and separately bounds dlen\nagainst the MFT record.  Nothing bounds asize against record_size, but\nall three writes that follow are into rec, a kmalloc(sbi->record_size)\nbuffer allocated by mi_init() (record.c:105):\n\n\tmemmove(Add2Ptr(attr, asize), attr, used - roff);\n\tmemcpy(attr, attr2, asize);\n\trec->used = cpu_to_le32(used + asize);\n\nWith record_size 0x400, roff 0x38, used 0x160 and asize 0x800 the memcpy\nwrites 2048 bytes at rec + 0x38, 0x438 bytes past the allocation, and\nrec->used is left at 0x960.  dlen is 0x18 here, so the existing\ndlen check passes: dlen bounds nothing about the size of the copy.\n\nThe equivalent non-replay path already refuses this.  mi_insert_attr()\nperforms the same insert and starts with (record.c:488):\n\n\tif (used + asize > sbi->record_size)\n\t\treturn NULL;\n\nApply the same bound, spelled as a subtraction to match the neighbouring\nclause.  used <= record_size holds here because check_file_record()\nvalidates it (fslog.c:2826) and is called on this record at fslog.c:3172;\nroff <= used - 4 follows from check_if_attr() together with the ATTR_END\ncheck at fslog.c:2844, so bounding used + asize bounds both copies.\n\nThe sibling WriteEndOfFileRecordSegment case does the equivalent check\nagainst record_size at fslog.c:3277.\n\nReproduced by mounting a crafted image on v7.2-rc5 under KASAN:\n\n  BUG: KASAN: slab-out-of-bounds in do_action.isra.0+0x41f6/0x83a0\n  Write of size 2048 at addr ffff888005c74838 by task mount/69\n\n  CPU: 0 UID: 0 PID: 69 Comm: mount Not tainted 7.2.0-rc5-00300-g8ba098e6b6ff #2\n  Call Trace:\n   kasan_report+0xce/0x100\n   kasan_check_range+0x105/0x1b0\n   __asan_memcpy+0x3c/0x60\n   do_action.isra.0+0x41f6/0x83a0\n   log_replay+0x920a/0xd300\n   ntfs_loadlog_and_replay+0x3ef/0x510\n   ntfs_fill_super+0x1d23/0x4550\n   get_tree_bdev_flags+0x2ef/0x550\n   vfs_get_tree+0x82/0x2f0\n   fc_mount+0x10/0x1b0\n   path_mount+0x517/0x1df0\n   __x64_sys_mount+0x20b/0x270\n   do_syscall_64+0xf9/0x540\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n  Allocated by task 69:\n   __kasan_kmalloc+0x8f/0xa0\n   __kmalloc_noprof+0x1b4/0x460\n   mi_init+0x81/0x110\n   mi_get+0x6a/0x220\n   do_action.isra.0+0x1db4/0x83a0\n   log_replay+0x920a/0xd300\n   ntfs_loadlog_and_replay+0x3ef/0x510\n   ntfs_fill_super+0x1d23/0x4550\n\n  The buggy address belongs to the object at ffff888005c74800\n   which belongs to the cache kmalloc-1k of size 1024\n  The buggy address is located 56 bytes inside of\n   allocated 1024-byte region [ffff888005c74800, ffff888005c74c00)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: bound CreateAttribute asize against record_size in do_action\n\nIn do_action()'s CreateAttribute case (fslog.c:3286), attr2 points into\nthe on-disk log record and asize = le32_to_cpu(attr2->size) is therefore\nattacker-controlled on mount.  The guard bounds asize only against the\nlog record itself,\n\n\tAdd2Ptr(attr2, asize) > Add2Ptr(lrh, rec_len)\n\nwhere rec_len is the client data length, and separately bounds dlen\nagainst the MFT record.  Nothing bounds asize against record_size, but\nall three writes that follow are into rec, a kmalloc(sbi->record_size)\nbuffer allocated by mi_init() (record.c:105):\n\n\tmemmove(Add2Ptr(attr, asize), attr, used - roff);\n\tmemcpy(attr, attr2, asize);\n\trec->used = cpu_to_le32(used + asize);\n\nWith record_size 0x400, roff 0x38, used 0x160 and asize 0x800 the memcpy\nwrites 2048 bytes at rec + 0x38, 0x438 bytes past the allocation, and\nrec->used is left at 0x960.  dlen is 0x18 here, so the existing\ndlen check passes: dlen bounds nothing about the size of the copy.\n\nThe equivalent non-replay path already refuses this.  mi_insert_attr()\nperforms the same insert and starts with (record.c:488):\n\n\tif (used + asize > sbi->record_size)\n\t\treturn NULL;\n\nApply the same bound, spelled as a subtraction to match the neighbouring\nclause.  used <= record_size holds here because check_file_record()\nvalidates it (fslog.c:2826) and is called on this record at fslog.c:3172;\nroff <= used - 4 follows from check_if_attr() together with the ATTR_END\ncheck at fslog.c:2844, so bounding used + asize bounds both copies.\n\nThe sibling WriteEndOfFileRecordSegment case does the equivalent check\nagainst record_size at fslog.c:3277.\n\nReproduced by mounting a crafted image on v7.2-rc5 under KASAN:\n\n  BUG: KASAN: slab-out-of-bounds in do_action.isra.0+0x41f6/0x83a0\n  Write of size 2048 at addr ffff888005c74838 by task mount/69\n\n  CPU: 0 UID: 0 PID: 69 Comm: mount Not tainted 7.2.0-rc5-00300-g8ba098e6b6ff #2\n  Call Trace:\n   kasan_report+0xce/0x100\n   kasan_check_range+0x105/0x1b0\n   __asan_memcpy+0x3c/0x60\n   do_action.isra.0+0x41f6/0x83a0\n   log_replay+0x920a/0xd300\n   ntfs_loadlog_and_replay+0x3ef/0x510\n   ntfs_fill_super+0x1d23/0x4550\n   get_tree_bdev_flags+0x2ef/0x550\n   vfs_get_tree+0x82/0x2f0\n   fc_mount+0x10/0x1b0\n   path_mount+0x517/0x1df0\n   __x64_sys_mount+0x20b/0x270\n   do_syscall_64+0xf9/0x540\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n  Allocated by task 69:\n   __kasan_kmalloc+0x8f/0xa0\n   __kmalloc_noprof+0x1b4/0x460\n   mi_init+0x81/0x110\n   mi_get+0x6a/0x220\n   do_action.isra.0+0x1db4/0x83a0\n   log_replay+0x920a/0xd300\n   ntfs_loadlog_and_replay+0x3ef/0x510\n   ntfs_fill_super+0x1d23/0x4550\n\n  The buggy address belongs to the object at ffff888005c74800\n   which belongs to the cache kmalloc-1k of size 1024\n  The buggy address is located 56 bytes inside of\n   allocated 1024-byte region [ffff888005c74800, ffff888005c74c00)","source":"cvelist"}],"published":"2026-11-30T13:17:45.857Z","modified":"2026-12-01T06:17:54.413Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/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:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"eb2c69866e1883e00f553127f40df01e9891164e","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"f2cdd82f1dc242e6f831e9cf580eeb5db4af0b5f","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"becddb2e2b856210ce34654261e27d233dfa904b","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"0ea0755124dba3c9682a87adcee8b4b3ab57902f","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"2ebe4f0736129014d6fc475215fc5bf0a0549737","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"119ab8d9dd61c24a604be6175dc658cebb3a3bbd","status":"affected"},{"type":"git","introduced":"b46acd6a6a627d876898e1c84d3f84902264b445","fixed":"fb0f0ef7b5a6bc761b372ce00764d4b6e0b91a47","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/eb2c69866e1883e00f553127f40df01e9891164e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2cdd82f1dc242e6f831e9cf580eeb5db4af0b5f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/becddb2e2b856210ce34654261e27d233dfa904b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ea0755124dba3c9682a87adcee8b4b3ab57902f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2ebe4f0736129014d6fc475215fc5bf0a0549737","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/119ab8d9dd61c24a604be6175dc658cebb3a3bbd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fb0f0ef7b5a6bc761b372ce00764d4b6e0b91a47","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99863","url":"https://www.cve.org/CVERecord?id=CVE-2026-99863","licence":"CVE Terms of Use","modified":"2026-12-01T05:43:54.012Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99863","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99863","licence":"Public domain","modified":"2026-12-01T06:17:54.413Z"}],"updatedAt":"2026-12-01T06:32:24.263Z","epss":{"score":0.0021,"percentile":0.11833,"date":"2026-12-01T12:00:22.000Z"}}