syzbot


KASAN: double-free or invalid-free in 0xea0

Status: upstream: reported C repro on 2022/12/04 22:03
Subsystems: jfs fat
[Documentation on labels]
Reported-by: syzbot+64d44843607c5f708c0d@syzkaller.appspotmail.com
First crash: 568d, last: 478d
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/03/03 22:49 29m bisect fix linux-4.14.y job log (0) log
2023/02/01 17:50 29m bisect fix linux-4.14.y job log (0) log

Sample crash report:
RDX: 0000000020000040 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00007ffe46ea5470 R09: 0000000000000002
R10: 00000000018084a0 R11: 0000000000000286 R12: 00000000ffffffff
R13: 0000000000000000 R14: 00007ffe46ea5470 R15: 0000000020000080
==================================================================
BUG: KASAN: double-free or invalid-free in 0xea0

CPU: 1 PID: 8008 Comm: syz-executor268 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_double_free+0x51/0x80 mm/kasan/report.c:333
 kasan_slab_free+0x16f/0x1a0 mm/kasan/kasan.c:514
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 dbUnmount+0xf2/0x130 fs/jfs/jfs_dmap.c:262
 jfs_umount+0x1cc/0x310 fs/jfs/jfs_umount.c:102
 jfs_put_super+0x61/0x140 fs/jfs/super.c:223
 generic_shutdown_super+0x144/0x370 fs/super.c:446
 kill_block_super+0x95/0xe0 fs/super.c:1161
 deactivate_locked_super+0x6c/0xd0 fs/super.c:319
 deactivate_super+0x7f/0xa0 fs/super.c:350
 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fec7419e017
RSP: 002b:00007ffe46ea44b8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fec7419e017
RDX: 00007ffe46ea4579 RSI: 000000000000000a RDI: 00007ffe46ea4570
RBP: 00007ffe46ea4570 R08: 00000000ffffffff R09: 00007ffe46ea4350
R10: 0000555556285683 R11: 0000000000000206 R12: 00007ffe46ea55f0
R13: 00005555562855f0 R14: 00007ffe46ea44e0 R15: 0000000000000002

Allocated by task 8058:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618
 kmalloc include/linux/slab.h:488 [inline]
 dbMount+0x4d/0x8b0 fs/jfs/jfs_dmap.c:177
 jfs_mount+0x110/0x380 fs/jfs/jfs_mount.c:133
 jfs_fill_super+0x52a/0xab0 fs/jfs/super.c:589
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a30 fs/namespace.c:2905
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 8058:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 dbUnmount+0xf2/0x130 fs/jfs/jfs_dmap.c:262
 jfs_mount_rw+0x1fe/0x430 fs/jfs/jfs_mount.c:255
 jfs_remount+0x47c/0x5a0 fs/jfs/super.c:488
 do_remount_sb+0x150/0x530 fs/super.c:868
 do_remount fs/namespace.c:2393 [inline]
 do_mount+0x15f3/0x2a30 fs/namespace.c:2896
 SYSC_mount fs/namespace.c:3121 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3098
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

The buggy address belongs to the object at ffff8880937bd580
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 0 bytes inside of
 2048-byte region [ffff8880937bd580, ffff8880937bdd80)
The buggy address belongs to the page:
page:ffffea00024def00 count:1 mapcount:0 mapping:ffff8880937bc480 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880937bc480 0000000000000000 0000000100000003
raw: ffffea0002bcb020 ffffea0002a971a0 ffff88813fe74c40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880937bd480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880937bd500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880937bd580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8880937bd600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880937bd680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/26 02:32 linux-4.14.y c4215ee4771b 9da18ae8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: double-free or invalid-free in 0xea0
2022/12/04 22:03 linux-4.14.y 179ef7fe8677 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: double-free or invalid-free in 0xea0
* Struck through repros no longer work on HEAD.