syzbot


KASAN: slab-out-of-bounds Read in ntfs_readdir

Status: upstream: reported C repro on 2023/04/27 08:51
Bug presence: origin:lts-only
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+7785fc7a8e502ab7376d@syzkaller.appspotmail.com
First crash: 701d, last: 12d
Fix commit to backport (bisect log) :
tree: upstream
commit 7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date: Mon Jan 15 07:20:25 2024 +0000

  fs: Remove NTFS classic

  
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2024/11/03 linux-5.15.y (ToT) 72244eab0dad C [report] KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/11/03 upstream (ToT) 3e5e6c9900c3 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: slab-out-of-bounds Read in ntfs_readdir ntfs C error 1 814d 814d 0/1 upstream: reported C repro on 2023/01/04 05:55
linux-4.14 KASAN: slab-out-of-bounds Read in ntfs_readdir ntfs C 1 755d 818d 0/1 upstream: reported C repro on 2022/12/31 19:18
upstream KASAN: slab-out-of-bounds Read in ntfs_readdir ntfs3 C error error 507 362d 821d 0/28 auto-obsoleted due to no activity on 2024/06/09 18:46
linux-6.1 KASAN: slab-out-of-bounds Read in ntfs_readdir origin:upstream missing-backport C done 69 68d 660d 0/3 upstream: reported C repro on 2023/06/07 15:22
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/03/12 08:05 11m retest repro linux-5.15.y report log
2025/03/12 08:05 10m retest repro linux-5.15.y report log
2025/02/24 11:47 12m retest repro linux-5.15.y report log
2025/02/24 11:47 11m retest repro linux-5.15.y report log
2025/02/24 11:47 11m retest repro linux-5.15.y report log
2025/02/24 11:47 13m retest repro linux-5.15.y report log
2025/02/24 11:47 11m retest repro linux-5.15.y report log
2025/01/22 05:10 10m retest repro linux-5.15.y report log
2025/01/22 05:10 9m retest repro linux-5.15.y report log
2025/01/02 01:47 16m retest repro linux-5.15.y report log
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2024/11/18 12:55 4h36m fix candidate upstream OK (1) job log
2024/08/30 14:35 2m fix candidate upstream error job log
2024/06/13 12:35 0m fix candidate upstream error job log
2023/09/27 06:26 0m bisect fix linux-5.15.y error job log

Sample crash report:
ntfs: (device loop0): ntfs_ucstonls(): Unicode name contains characters that cannot be converted to character set maccenteuro.  You might want to try to use the mount option nls=utf8.
ntfs: (device loop0): ntfs_filldir(): Skipping unrepresentable inode 0x4.
==================================================================
BUG: KASAN: slab-out-of-bounds in ntfs_filldir fs/ntfs/dir.c:1021 [inline]
BUG: KASAN: slab-out-of-bounds in ntfs_readdir+0xed5/0x36f0 fs/ntfs/dir.c:1200
Read of size 1 at addr ffff88802ae65d99 by task syz-executor113/4163

CPU: 1 PID: 4163 Comm: syz-executor113 Not tainted 5.15.175-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 ntfs_filldir fs/ntfs/dir.c:1021 [inline]
 ntfs_readdir+0xed5/0x36f0 fs/ntfs/dir.c:1200
 iterate_dir+0x224/0x570
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f9e71995ea3
Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 92 48 fb ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b8 ff ff ff f7 d8
RSP: 002b:00007ffc6d196188 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 0000555572f6d770 RCX: 00007f9e71995ea3
RDX: 0000000000008000 RSI: 0000555572f6d770 RDI: 0000000000000005
RBP: 0000555572f6d744 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb8
R13: 0000000000000016 R14: 0000555572f6d740 R15: 431bde82d7b634db
 </TASK>

Allocated by task 4163:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 __kmalloc+0x168/0x300 mm/slub.c:4407
 kmalloc include/linux/slab.h:596 [inline]
 ntfs_readdir+0x823/0x36f0 fs/ntfs/dir.c:1162
 iterate_dir+0x224/0x570
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff88802ae65c00
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 409 bytes inside of
 512-byte region [ffff88802ae65c00, ffff88802ae65e00)
The buggy address belongs to the page:
page:ffffea0000ab9900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ae64
head:ffffea0000ab9900 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000977200 0000000500000005 ffff888017441c80
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3106, ts 15789254797, free_ts 0
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5465
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xbb/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 alloc_bprm+0x57/0x700 fs/exec.c:1516
 kernel_execve+0x49/0x9b0 fs/exec.c:1978
 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:112
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88802ae65c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88802ae65d00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
>ffff88802ae65d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                            ^
 ffff88802ae65e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88802ae65e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (49):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/06 06:15 linux-5.15.y 91786f140358 f3558dbf .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/28 08:41 linux-5.15.y f67653019430 4cd5bb25 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/28 08:28 linux-5.15.y f67653019430 4cd5bb25 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/28 08:14 linux-5.15.y f67653019430 4cd5bb25 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/03 03:13 linux-5.15.y c16c81c81336 568559e4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/03 00:11 linux-5.15.y c16c81c81336 568559e4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/02 23:42 linux-5.15.y c16c81c81336 568559e4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/02 23:14 linux-5.15.y c16c81c81336 568559e4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/02 22:12 linux-5.15.y c16c81c81336 568559e4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/26 15:46 linux-5.15.y b95c01af2113 bcd9b39f .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/07 16:34 linux-5.15.y d7af3e5ba454 a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/07 16:12 linux-5.15.y d7af3e5ba454 a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/07 15:52 linux-5.15.y d7af3e5ba454 a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/03/16 16:18 linux-5.15.y 0c935c049b5c e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/26 03:49 linux-5.15.y c16c81c81336 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/25 00:26 linux-5.15.y c16c81c81336 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/02/10 03:48 linux-5.15.y c16c81c81336 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/01/08 04:53 linux-5.15.y 91786f140358 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2025/01/06 05:19 linux-5.15.y 91786f140358 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/04/01 18:18 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/27 21:06 linux-5.15.y 9465fef4ae35 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/27 01:12 linux-5.15.y 9465fef4ae35 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/27 01:12 linux-5.15.y 9465fef4ae35 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/26 19:33 linux-5.15.y b95c01af2113 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2024/03/26 12:33 linux-5.15.y b95c01af2113 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/21 23:13 linux-5.15.y d54cfc420586 abdf9bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/20 06:10 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/16 11:08 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/14 19:54 linux-5.15.y d54cfc420586 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/22 05:29 linux-5.15.y d54cfc420586 abdf9bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/20 00:31 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/19 21:49 linux-5.15.y d54cfc420586 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/18 16:23 linux-5.15.y d54cfc420586 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/17 19:20 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/17 18:22 linux-5.15.y d54cfc420586 20f8b3c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/16 23:07 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/16 23:06 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/15 16:18 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/14 21:00 linux-5.15.y d54cfc420586 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/07/14 20:01 linux-5.15.y d54cfc420586 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/16 16:37 linux-5.15.y 471e639e59d1 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/13 03:44 linux-5.15.y 7349e40704a0 749afb64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/12 19:12 linux-5.15.y 7349e40704a0 aaed0183 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/10 19:43 linux-5.15.y 7349e40704a0 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/10 12:43 linux-5.15.y 7349e40704a0 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/08 02:43 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/07 19:57 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/06/07 15:35 linux-5.15.y d7af3e5ba454 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
2023/04/27 08:51 linux-5.15.y f48aeeaaa64c 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_readdir
* Struck through repros no longer work on HEAD.