syzbot


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

Status: upstream: reported C repro on 2020/04/08 18:25
Reported-by: syzbot+e1f6e4304964f5d37eb7@syzkaller.appspotmail.com
First crash: 1479d, last: 432d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in __ext4_check_dir_entry ext4 C 18 2217d 2218d 5/26 fixed on 2018/05/29 12:14
Fix bisection attempts (25)
Created Duration User Patch Repo Result
2023/02/19 16:02 34m bisect fix linux-4.14.y job log (0) log
2023/01/20 05:56 28m bisect fix linux-4.14.y job log (0) log
2022/10/27 14:20 32m bisect fix linux-4.14.y job log (0) log
2022/09/19 13:58 31m bisect fix linux-4.14.y job log (0) log
2022/08/20 11:20 29m bisect fix linux-4.14.y job log (0) log
2022/07/21 10:45 35m bisect fix linux-4.14.y job log (0) log
2022/06/21 10:09 35m bisect fix linux-4.14.y job log (0) log
2022/05/22 09:28 28m bisect fix linux-4.14.y job log (0) log
2022/04/22 05:46 27m bisect fix linux-4.14.y job log (0) log
2022/03/23 04:34 29m bisect fix linux-4.14.y job log (0) log
2022/02/20 13:55 42m bisect fix linux-4.14.y job log (0) log
2022/01/21 12:11 38m bisect fix linux-4.14.y job log (0) log
2021/12/22 11:31 39m bisect fix linux-4.14.y job log (0) log
2021/11/22 10:45 34m bisect fix linux-4.14.y job log (0) log
2021/10/23 09:27 32m bisect fix linux-4.14.y job log (0) log
2021/09/22 17:31 32m bisect fix linux-4.14.y job log (0) log
2021/08/23 15:21 30m bisect fix linux-4.14.y job log (0) log
2021/07/24 14:23 30m bisect fix linux-4.14.y job log (0) log
2021/06/24 13:43 27m bisect fix linux-4.14.y job log (0) log
2021/05/25 10:35 36m bisect fix linux-4.14.y job log (0) log
2021/04/25 09:36 37m bisect fix linux-4.14.y job log (0) log
2021/03/26 03:44 32m bisect fix linux-4.14.y job log (0) log
2021/02/24 02:16 34m bisect fix linux-4.14.y job log (0) log
2021/01/23 21:51 34m bisect fix linux-4.14.y job log (0) log
2020/12/24 21:21 30m bisect fix linux-4.14.y job log (0) log

Sample crash report:
audit: type=1400 audit(1592799108.021:8): avc:  denied  { execmem } for  pid=6320 comm="syz-executor526" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
==================================================================
BUG: KASAN: slab-out-of-bounds in __ext4_check_dir_entry+0x2ef/0x340 fs/ext4/dir.c:86
Read of size 1 at addr ffff88808ef64001 by task syz-executor526/6320

CPU: 1 PID: 6320 Comm: syz-executor526 Not tainted 4.14.184-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1dc mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393
 __ext4_check_dir_entry+0x2ef/0x340 fs/ext4/dir.c:86
 ext4_readdir+0x819/0x27e0 fs/ext4/dir.c:240
 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52
 SYSC_getdents fs/readdir.c:269 [inline]
 SyS_getdents+0x132/0x260 fs/readdir.c:250
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x440259
RSP: 002b:00007fff473dace8 EFLAGS: 00000246 ORIG_RAX: 000000000000004e
RAX: ffffffffffffffda RBX: 00007fff473dacf0 RCX: 0000000000440259
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 65732f636f72702f R09: 65732f636f72702f
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000401b40
R13: 0000000000401bd0 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 4655:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 getname_flags+0xc8/0x550 fs/namei.c:138
 getname fs/namei.c:209 [inline]
 user_path_create fs/namei.c:3732 [inline]
 SYSC_symlinkat fs/namei.c:4176 [inline]
 SyS_symlinkat+0xa2/0x1f0 fs/namei.c:4163
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 4655:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 putname+0xcd/0x110 fs/namei.c:259
 filename_create+0x1c1/0x3f0 fs/namei.c:3697
 user_path_create fs/namei.c:3732 [inline]
 SYSC_symlinkat fs/namei.c:4176 [inline]
 SyS_symlinkat+0xb4/0x1f0 fs/namei.c:4163
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff88808ef64200
 which belongs to the cache names_cache of size 4096
The buggy address is located 511 bytes to the left of
 4096-byte region [ffff88808ef64200, ffff88808ef65200)
The buggy address belongs to the page:
page:ffffea00023bd900 count:1 mapcount:0 mapping:ffff88808ef64200 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff88808ef64200 0000000000000000 0000000100000001
raw: ffffea00023a9420 ffffea0002371920 ffff8880aa9dacc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88808ef63f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88808ef63f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808ef64000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff88808ef64080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88808ef64100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/22 04:13 linux-4.14.y b850307b279c eabcced4 .config console log report syz C ci2-linux-4-14
2020/06/16 05:01 linux-4.14.y b850307b279c baca2611 .config console log report syz C ci2-linux-4-14
2020/06/12 02:34 linux-4.14.y b850307b279c 1beaee21 .config console log report syz C ci2-linux-4-14
2020/05/10 16:02 linux-4.14.y ab9dfda23248 8742a2b9 .config console log report syz C ci2-linux-4-14
2020/04/20 21:14 linux-4.14.y c10b57a567e4 347a5dc3 .config console log report syz C ci2-linux-4-14
2020/04/08 18:40 linux-4.14.y 4520f06b03ae db9bcd4b .config console log report syz C ci2-linux-4-14
2020/10/25 19:47 linux-4.14.y 5b7a52cd2eef a1839e81 .config console log report info ci2-linux-4-14
2020/09/23 20:22 linux-4.14.y cbfa1702aaf6 54289b08 .config console log report info ci2-linux-4-14
2020/07/21 22:45 linux-4.14.y b850307b279c e562dd8a .config console log report ci2-linux-4-14
2020/07/21 21:17 linux-4.14.y b850307b279c e562dd8a .config console log report ci2-linux-4-14
2020/07/19 20:55 linux-4.14.y b850307b279c 9c812472 .config console log report ci2-linux-4-14
2020/07/14 22:16 linux-4.14.y b850307b279c 6f458026 .config console log report ci2-linux-4-14
2020/06/17 22:32 linux-4.14.y b850307b279c b6c46f43 .config console log report ci2-linux-4-14
2020/06/09 21:53 linux-4.14.y c6db52a88798 092934c1 .config console log report ci2-linux-4-14
2020/06/03 23:12 linux-4.14.y c6db52a88798 a5ce5de0 .config console log report ci2-linux-4-14
2020/06/03 22:21 linux-4.14.y c6db52a88798 a5ce5de0 .config console log report ci2-linux-4-14
2020/05/03 17:33 linux-4.14.y 773e2b1cd56a 58ae5e18 .config console log report ci2-linux-4-14
2020/04/08 18:24 linux-4.14.y 4520f06b03ae db9bcd4b .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.