syzbot


KASAN: use-after-free Read in trailing_symlink

Status: auto-closed as invalid on 2019/08/24 20:25
Reported-by: syzbot+faadffa41cca7eb0aeac@syzkaller.appspotmail.com
First crash: 1886d, last: 1886d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in trailing_symlink fs syz done 2 1960d 1975d 12/26 fixed on 2019/04/12 08:05

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in get_link fs/namei.c:1118 [inline]
BUG: KASAN: use-after-free in trailing_symlink+0x6a7/0x760 fs/namei.c:2297
Read of size 1 at addr ffff88818be623a8 by task syz-executor.0/4369

CPU: 0 PID: 4369 Comm: syz-executor.0 Not tainted 4.14.103+ #19
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0xb9/0x10e lib/dump_stack.c:53
 print_address_description+0x60/0x226 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+0x88/0x2a5 mm/kasan/report.c:393

Allocated by task 4369:
 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
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc_node mm/slub.c:2723 [inline]
 slab_alloc mm/slub.c:2731 [inline]
 __kmalloc_track_caller+0xf1/0x310 mm/slub.c:4288
 kstrdup+0x36/0x70 mm/util.c:56
 bpf_symlink+0x22/0x110 kernel/bpf/inode.c:200
 vfs_symlink2+0x32a/0x560 fs/namei.c:4208
 SYSC_symlinkat fs/namei.c:4241 [inline]
 SyS_symlinkat+0x116/0x1e0 fs/namei.c:4221
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289

Freed by task 4381:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:524
 slab_free_hook mm/slub.c:1389 [inline]
 slab_free_freelist_hook mm/slub.c:1410 [inline]
 slab_free mm/slub.c:2966 [inline]
 kfree+0xf5/0x310 mm/slub.c:3897
 bpf_evict_inode+0x102/0x130 kernel/bpf/inode.c:381
 evict+0x2cb/0x5f0 fs/inode.c:554
 iput_final fs/inode.c:1516 [inline]
 iput fs/inode.c:1543 [inline]
 iput+0x36f/0x8d0 fs/inode.c:1528
 do_unlinkat+0x376/0x5e0 fs/namei.c:4150
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289

The buggy address belongs to the object at ffff88818be623a8
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff88818be623a8, ffff88818be623b0)
The buggy address belongs to the page:
page:ffffea00062f9880 count:1 mapcount:0 mapping:          (null) index:0x0
flags: 0x4000000000000100(slab)
raw: 4000000000000100 0000000000000000 0000000000000000 0000000180aa00aa
raw: ffffea00065d9600 0000000400000004 ffff8881da803c00 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88818be62280: fc fb fc fc fb fc fc 00 fc fc fb fc fc fb fc fc
 ffff88818be62300: fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc 00
>ffff88818be62380: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc
                                  ^
 ffff88818be62400: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc
 ffff88818be62480: fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/25 20:24 android-4.14 6fd50f70fd4c a70141bf .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.