syzbot


KASAN: use-after-free Read in __vb2_perform_fileio

Status: upstream: reported C repro on 2019/04/16 13:50
Reported-by: syzbot+ec7ef6c975892200130c@syzkaller.appspotmail.com
First crash: 1896d, last: 477d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in __vb2_perform_fileio C done 13 1669d 1898d 1/1 fixed on 2019/12/30 15:48
upstream KASAN: use-after-free Read in __vb2_perform_fileio C done 786 1875d 2065d 12/27 fixed on 2019/06/14 18:22
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2021/11/09 22:06 23m bisect fix linux-4.14.y job log (0) log
2021/09/24 15:06 25m bisect fix linux-4.14.y job log (0) log
2021/07/05 17:10 22m bisect fix linux-4.14.y job log (0) log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __vb2_perform_fileio+0xce9/0xda0 drivers/media/v4l2-core/videobuf2-core.c:2390
Read of size 4 at addr ffff8880b3d8799c by task syz-executor191/7998

CPU: 1 PID: 7998 Comm: syz-executor191 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_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
 __vb2_perform_fileio+0xce9/0xda0 drivers/media/v4l2-core/videobuf2-core.c:2390
 vb2_fop_read+0x1ef/0x3d0 drivers/media/v4l2-core/videobuf2-v4l2.c:895
 v4l2_read+0x19a/0x200 drivers/media/v4l2-core/v4l2-dev.c:309
 do_loop_readv_writev fs/read_write.c:695 [inline]
 do_loop_readv_writev fs/read_write.c:682 [inline]
 do_iter_read+0x3eb/0x5b0 fs/read_write.c:919
 vfs_readv+0xc8/0x120 fs/read_write.c:981
 do_preadv fs/read_write.c:1065 [inline]
 SYSC_preadv fs/read_write.c:1115 [inline]
 SyS_preadv+0x15a/0x200 fs/read_write.c:1110
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f547998e479
RSP: 002b:00007ffe6bd374a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f547998e479
RDX: 0000000000000004 RSI: 0000000020000600 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000006f3a
R13: 00007ffe6bd374bc R14: 00007ffe6bd374d0 R15: 00007ffe6bd374c0

Allocated by task 7998:
 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]
 __vb2_init_fileio+0x17f/0xa90 drivers/media/v4l2-core/videobuf2-core.c:2235
 __vb2_perform_fileio+0x993/0xda0 drivers/media/v4l2-core/videobuf2-core.c:2369
 vb2_fop_read+0x1ef/0x3d0 drivers/media/v4l2-core/videobuf2-v4l2.c:895
 v4l2_read+0x19a/0x200 drivers/media/v4l2-core/v4l2-dev.c:309
 do_loop_readv_writev fs/read_write.c:695 [inline]
 do_loop_readv_writev fs/read_write.c:682 [inline]
 do_iter_read+0x3eb/0x5b0 fs/read_write.c:919
 vfs_readv+0xc8/0x120 fs/read_write.c:981
 do_preadv fs/read_write.c:1065 [inline]
 SYSC_preadv fs/read_write.c:1115 [inline]
 SyS_preadv+0x15a/0x200 fs/read_write.c:1110
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 7997:
 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
 __vb2_cleanup_fileio+0xf5/0x150 drivers/media/v4l2-core/videobuf2-core.c:2328
 vb2_core_queue_release+0x17/0x70 drivers/media/v4l2-core/videobuf2-core.c:2051
 vb2_queue_release drivers/media/v4l2-core/videobuf2-v4l2.c:669 [inline]
 _vb2_fop_release+0x1c1/0x280 drivers/media/v4l2-core/videobuf2-v4l2.c:840
 vivid_fop_release+0x17d/0x6c0 drivers/media/platform/vivid/vivid-core.c:508
 v4l2_release+0xf4/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xa44/0x2850 kernel/exit.c:868
 do_group_exit+0x100/0x2e0 kernel/exit.c:965
 SYSC_exit_group kernel/exit.c:976 [inline]
 SyS_exit_group+0x19/0x20 kernel/exit.c:974
 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 ffff8880b3d87680
 which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 796 bytes inside of
 1024-byte region [ffff8880b3d87680, ffff8880b3d87a80)
The buggy address belongs to the page:
page:ffffea0002cf6180 count:1 mapcount:0 mapping:ffff8880b3d86000 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b3d86000 0000000000000000 0000000100000007
raw: ffffea00025816a0 ffffea000259a220 ffff88813fe74ac0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b3d87880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b3d87900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880b3d87980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff8880b3d87a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b3d87a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (454):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/04 02:57 linux-4.14.y c4215ee4771b f0036e18 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/09/23 23:15 linux-4.14.y 4edbf74132a4 0042f2b4 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/06/12 07:18 linux-4.14.y b8f3be299d51 0d5abf15 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/05/04 00:16 linux-4.14.y e3a56aaade89 dc9e5259 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/02/05 09:19 linux-4.14.y b86ee2b7ae42 e13a05ed .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/01/03 09:18 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/01/01 10:21 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2021/10/10 22:06 linux-4.14.y 756db2ba8bde 838e7e2c .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2021/08/25 14:30 linux-4.14.y 162b95d01320 b599f2fc .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2021/08/02 10:27 linux-4.14.y ce4d1565392b 6c236867 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2021/06/05 17:10 linux-4.14.y a6b2dae3ee3a 500c2339 .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2020/10/13 10:54 linux-4.14.y cbfa1702aaf6 bd69ee0d .config console log report syz C ci2-linux-4-14
2020/09/28 11:14 linux-4.14.y cbfa1702aaf6 6bfdbe89 .config console log report syz C ci2-linux-4-14
2020/02/05 12:20 linux-4.14.y 9fa690a2a016 93e5e335 .config console log report syz C ci2-linux-4-14
2019/10/06 00:45 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report syz C ci2-linux-4-14
2019/04/20 23:20 linux-4.14.y 68d7a45eec10 b0e8efcb .config console log report syz C ci2-linux-4-14
2019/04/16 12:49 linux-4.14.y 1ec8f1f0bffe 505ab413 .config console log report syz C ci2-linux-4-14
2019/04/28 10:17 linux-4.14.y fa5941f45d7e b617407b .config console log report syz ci2-linux-4-14
2019/04/25 05:39 linux-4.14.y 68d7a45eec10 8e3c52b1 .config console log report syz ci2-linux-4-14
2019/04/22 19:35 linux-4.14.y 68d7a45eec10 0a77c33c .config console log report syz ci2-linux-4-14
2023/03/05 14:39 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 __vb2_perform_fileio
2023/03/04 12:01 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 __vb2_perform_fileio
2023/03/03 18:13 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 __vb2_perform_fileio
2023/03/01 06:04 linux-4.14.y 7878a41b6cc1 95aee97a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/02/25 19:14 linux-4.14.y 7878a41b6cc1 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/02/25 03:49 linux-4.14.y 1e61bd26fa2c ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/02/19 18:11 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 __vb2_perform_fileio
2023/02/16 22:10 linux-4.14.y a8ad60f2af58 851bc19a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/02/13 13:06 linux-4.14.y a8ad60f2af58 957959cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/02/06 05:09 linux-4.14.y 3949d1610004 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
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 __vb2_perform_fileio
2023/02/01 22:58 linux-4.14.y 3949d1610004 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/01/29 15:47 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 __vb2_perform_fileio
2023/01/25 18:10 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 __vb2_perform_fileio
2023/01/21 03:10 linux-4.14.y 97205fccccdc cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2023/01/20 17:50 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 __vb2_perform_fileio
2023/01/13 07:18 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 __vb2_perform_fileio
2023/01/06 22:08 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 __vb2_perform_fileio
2023/01/03 11:36 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 __vb2_perform_fileio
2022/12/27 21:44 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 __vb2_perform_fileio
2022/12/27 12:42 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 __vb2_perform_fileio
2022/12/23 07:04 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 __vb2_perform_fileio
2022/12/19 20:28 linux-4.14.y c4215ee4771b c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/12/13 18: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 __vb2_perform_fileio
2022/12/12 07:03 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 __vb2_perform_fileio
2022/12/07 13:04 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 __vb2_perform_fileio
2022/12/05 15:29 linux-4.14.y 179ef7fe8677 045cbb84 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/12/05 02:03 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 __vb2_perform_fileio
2022/12/03 07:03 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 __vb2_perform_fileio
2022/12/01 18:39 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 __vb2_perform_fileio
2022/11/29 20:39 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 __vb2_perform_fileio
2022/11/23 09:19 linux-4.14.y e911713e40ca 52fdf57a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/11/21 21:24 linux-4.14.y e911713e40ca 1c576c23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/11/15 22:41 linux-4.14.y e911713e40ca 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/11/11 04:40 linux-4.14.y e911713e40ca f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/11/09 01:38 linux-4.14.y a901bb6c7db7 5fa28208 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/28 21:19 linux-4.14.y 41f36d7859a7 8168b69e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/28 12:29 linux-4.14.y 41f36d7859a7 8168b69e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/28 00:41 linux-4.14.y 41f36d7859a7 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/15 01:37 linux-4.14.y 9d5c0b3a8e1a 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/13 00:46 linux-4.14.y 9d5c0b3a8e1a 3f6b40a1 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/11 15:38 linux-4.14.y 9d5c0b3a8e1a 02b6492e .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/11 00:39 linux-4.14.y 9d5c0b3a8e1a 5bcf0c31 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/10 23:07 linux-4.14.y 9d5c0b3a8e1a 5bcf0c31 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2022/10/10 12:50 linux-4.14.y 9d5c0b3a8e1a 5bcf0c31 .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in __vb2_perform_fileio
2021/01/16 09:39 linux-4.14.y f79dc86058bc 65a7a854 .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.