syzbot


KASAN: use-after-free Read in f2fs_evict_inode

Status: upstream: reported C repro on 2021/02/15 22:59
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+4be0cca7a67a1c49b8be@syzkaller.appspotmail.com
First crash: 1225d, last: 476d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in f2fs_evict_inode f2fs C error 391 475d 1362d 0/1 upstream: reported C repro on 2020/10/01 22:34
Fix bisection attempts (16)
Created Duration User Patch Repo Result
2022/10/28 20:26 28m bisect fix linux-4.14.y job log (0) log
2022/09/15 10:02 25m bisect fix linux-4.14.y job log (0) log
2022/08/16 09:38 22m bisect fix linux-4.14.y job log (0) log
2022/07/17 09:12 26m bisect fix linux-4.14.y job log (0) log
2022/05/27 15:36 31m bisect fix linux-4.14.y job log (0) log
2022/03/13 21:53 25m bisect fix linux-4.14.y job log (0) log
2022/02/11 01:21 22m bisect fix linux-4.14.y job log (0) log
2021/12/12 01:21 26m bisect fix linux-4.14.y job log (0) log
2021/11/12 00:56 25m bisect fix linux-4.14.y job log (0) log
2021/10/13 00:29 26m bisect fix linux-4.14.y job log (0) log
2021/09/13 00:04 25m bisect fix linux-4.14.y job log (0) log
2021/08/13 23:41 22m bisect fix linux-4.14.y job log (0) log
2021/07/14 19:36 22m bisect fix linux-4.14.y job log (0) log
2021/06/14 19:13 23m bisect fix linux-4.14.y job log (0) log
2021/05/15 18:40 30m bisect fix linux-4.14.y job log (0) log
2021/04/08 18:47 21m bisect fix linux-4.14.y job log (0) log

Sample crash report:
F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (loop0): Can't find valid F2FS filesystem in 2th superblock
F2FS-fs (loop0): invalid crc value
F2FS-fs (loop0): Cannot turn on journaled quota: error -2
==================================================================
BUG: KASAN: use-after-free in f2fs_evict_inode+0xdad/0x1070 fs/f2fs/inode.c:544
Read of size 4 at addr ffff888095fc7470 by task syz-executor201/7993

CPU: 0 PID: 7993 Comm: syz-executor201 Not tainted 4.14.281-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/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
 f2fs_evict_inode+0xdad/0x1070 fs/f2fs/inode.c:544
 evict+0x2c8/0x700 fs/inode.c:555
 iput_final fs/inode.c:1524 [inline]
 iput+0x458/0x7e0 fs/inode.c:1551
 dentry_unlink_inode+0x25c/0x310 fs/dcache.c:387
 __dentry_kill+0x320/0x550 fs/dcache.c:591
 shrink_dentry_list+0x2c2/0xac0 fs/dcache.c:1069
 shrink_dcache_sb+0x105/0x1b0 fs/dcache.c:1191
 f2fs_fill_super+0x127f/0x56a0 fs/f2fs/super.c:2767
 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+0x46/0xbb
RIP: 0033:0x7fb02ca2c2ea
RSP: 002b:00007fb02c9d8168 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fb02c9d81c0 RCX: 00007fb02ca2c2ea
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fb02c9d8180
RBP: 0000000000000008 R08: 00007fb02c9d81c0 R09: 00007fb02c9d86b8
R10: 0000000000000000 R11: 0000000000000286 R12: 00007fb02c9d8180
R13: 00000000200002c0 R14: 0000000000000004 R15: 0000000000000005

Allocated by task 7993:
 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]
 kzalloc include/linux/slab.h:661 [inline]
 f2fs_fill_super+0xef/0x56a0 fs/f2fs/super.c:2407
 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+0x46/0xbb

Freed by task 7993:
 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
 f2fs_fill_super+0x1263/0x56a0 fs/f2fs/super.c:2762
 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+0x46/0xbb

The buggy address belongs to the object at ffff888095fc6b40
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2352 bytes inside of
 4096-byte region [ffff888095fc6b40, ffff888095fc7b40)
The buggy address belongs to the page:
page:ffffea000257f180 count:1 mapcount:0 mapping:ffff888095fc6b40 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff888095fc6b40 0000000000000000 0000000100000001
raw: ffffea0002cc7420 ffffea000257f120 ffff88813fe74dc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888095fc7300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888095fc7380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888095fc7400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
 ffff888095fc7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888095fc7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (99):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/03 05:39 linux-4.14.y 501eec4f9e13 02dddea8 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2021/02/15 23:29 linux-4.14.y 2c8a3fceddf0 98682e5e .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/03/06 05:47 linux-4.14.y 7878a41b6cc1 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/03/01 16:20 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/03/01 13:39 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/03/01 08:43 linux-4.14.y 7878a41b6cc1 ef65e6cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/20 21:29 linux-4.14.y a8ad60f2af58 2414209c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/18 23:27 linux-4.14.y a8ad60f2af58 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/09 20:12 linux-4.14.y a8ad60f2af58 07980f9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/06 14:19 linux-4.14.y a8ad60f2af58 0a9c11b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/03 17:39 linux-4.14.y 3949d1610004 1b2f701a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/02/02 19:11 linux-4.14.y 3949d1610004 16d19e30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/24 07:09 linux-4.14.y 3949d1610004 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/20 12:38 linux-4.14.y 97205fccccdc dd15ff29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/20 00:18 linux-4.14.y 97205fccccdc 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/19 20:58 linux-4.14.y 97205fccccdc 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/11 15:12 linux-4.14.y c4215ee4771b 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/04 07:44 linux-4.14.y c4215ee4771b 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2023/01/03 12:35 linux-4.14.y c4215ee4771b f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/28 04:49 linux-4.14.y c4215ee4771b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/27 14:10 linux-4.14.y c4215ee4771b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/22 11:55 linux-4.14.y c4215ee4771b 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/20 20:32 linux-4.14.y c4215ee4771b d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/20 19:03 linux-4.14.y c4215ee4771b d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/18 23:58 linux-4.14.y c4215ee4771b 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/16 20:04 linux-4.14.y c4215ee4771b 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/16 17:40 linux-4.14.y c4215ee4771b 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/16 15:54 linux-4.14.y c4215ee4771b 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/15 10:49 linux-4.14.y c4215ee4771b 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 19:50 linux-4.14.y c4215ee4771b b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 17:53 linux-4.14.y c4215ee4771b b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 16:01 linux-4.14.y c4215ee4771b b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 14:32 linux-4.14.y c4215ee4771b b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 08:32 linux-4.14.y 65afe34ac33d f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 03:03 linux-4.14.y 65afe34ac33d f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/14 02:36 linux-4.14.y 65afe34ac33d f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/13 22:43 linux-4.14.y 65afe34ac33d f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/13 18:46 linux-4.14.y 65afe34ac33d f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/09 20:01 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/09 17:28 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/09 16:26 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/08 16:18 linux-4.14.y 65afe34ac33d 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/06 17:34 linux-4.14.y 179ef7fe8677 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/12/01 21:55 linux-4.14.y 179ef7fe8677 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/30 12:13 linux-4.14.y 179ef7fe8677 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/29 17:54 linux-4.14.y 179ef7fe8677 579a3740 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/17 23:16 linux-4.14.y e911713e40ca 4ba8ab94 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/10 17:54 linux-4.14.y e911713e40ca 3ead01ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/10 03:24 linux-4.14.y a901bb6c7db7 b2488a87 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/11/08 06:21 linux-4.14.y a901bb6c7db7 6feb842b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2022/09/26 09:26 linux-4.14.y 4edbf74132a4 d59ba983 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
2021/02/15 22:59 linux-4.14.y 2c8a3fceddf0 98682e5e .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in f2fs_evict_inode
* Struck through repros no longer work on HEAD.