syzbot


KCSAN: data-race in data_push_tail / dentry_name (2)

Status: auto-obsoleted due to no activity on 2024/02/11 06:34
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+ee09685eb035c5884c39@syzkaller.appspotmail.com
First crash: 118d, last: 118d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / dentry_name fs 2 941d 953d 0/26 auto-closed as invalid on 2021/11/10 04:07

Sample crash report:
CPU: 1 PID: 13470 Comm: syz-executor.5 Not tainted 6.7.0-rc8-syzkaller-00177-g52b1853b080a #0
==================================================================
BUG: KCSAN: data-race in data_push_tail / dentry_name

write to 0xffffffff86ea5c3b of 1 bytes by task 13471 on cpu 0:
 dentry_name+0x2ea/0x380 lib/vsprintf.c:942
 pointer+0x26c/0xd10 lib/vsprintf.c:2465
 vsnprintf+0x861/0xe20 lib/vsprintf.c:2828
 vscnprintf+0x42/0x80 lib/vsprintf.c:2930
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2124
 vprintk_store+0x56f/0x800 kernel/printk/printk.c:2238
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318
 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2328
 fail_dump lib/fault-inject.c:45 [inline]
 should_fail_ex+0x207/0x230 lib/fault-inject.c:153
 __should_fail_alloc_page+0xfd/0x110 mm/fail_page_alloc.c:42
 prepare_alloc_pages mm/page_alloc.c:4341 [inline]
 __alloc_pages+0x108/0x340 mm/page_alloc.c:4557
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 shmem_alloc_folio mm/shmem.c:1630 [inline]
 shmem_alloc_and_add_folio mm/shmem.c:1670 [inline]
 shmem_get_folio_gfp+0x3b2/0xb40 mm/shmem.c:2054
 shmem_get_folio mm/shmem.c:2136 [inline]
 shmem_write_begin+0xa0/0x1b0 mm/shmem.c:2719
 generic_perform_write+0x1c9/0x410 mm/filemap.c:3927
 shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2895
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffffff86ea5c38 of 8 bytes by task 13470 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1046
 prb_reserve+0x893/0xbc0 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x53e/0x800 kernel/printk/printk.c:2228
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318
 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2328
 dump_stack_print_info+0xb4/0x120 lib/dump_stack.c:57
 __dump_stack lib/dump_stack.c:87 [inline]
 dump_stack_lvl+0xce/0x130 lib/dump_stack.c:106
 dump_stack+0x15/0x20 lib/dump_stack.c:113
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail_ex+0x21f/0x230 lib/fault-inject.c:153
 __should_fail_alloc_page+0xfd/0x110 mm/fail_page_alloc.c:42
 prepare_alloc_pages mm/page_alloc.c:4341 [inline]
 __alloc_pages+0x108/0x340 mm/page_alloc.c:4557
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 shmem_alloc_folio mm/shmem.c:1630 [inline]
 shmem_alloc_and_add_folio mm/shmem.c:1670 [inline]
 shmem_get_folio_gfp+0x3b2/0xb40 mm/shmem.c:2054
 shmem_get_folio mm/shmem.c:2136 [inline]
 shmem_write_begin+0xa0/0x1b0 mm/shmem.c:2719
 generic_perform_write+0x1c9/0x410 mm/filemap.c:3927
 shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2895
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000010000e3b9 -> 0x61705f6c69616620

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 13470 Comm: syz-executor.5 Not tainted 6.7.0-rc8-syzkaller-00177-g52b1853b080a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xda/0x130 lib/dump_stack.c:106
 dump_stack+0x15/0x20 lib/dump_stack.c:113
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail_ex+0x21f/0x230 lib/fault-inject.c:153
 __should_fail_alloc_page+0xfd/0x110 mm/fail_page_alloc.c:42
 prepare_alloc_pages mm/page_alloc.c:4341 [inline]
 __alloc_pages+0x108/0x340 mm/page_alloc.c:4557
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 shmem_alloc_folio mm/shmem.c:1630 [inline]
 shmem_alloc_and_add_folio mm/shmem.c:1670 [inline]
 shmem_get_folio_gfp+0x3b2/0xb40 mm/shmem.c:2054
 shmem_get_folio mm/shmem.c:2136 [inline]
 shmem_write_begin+0xa0/0x1b0 mm/shmem.c:2719
 generic_perform_write+0x1c9/0x410 mm/filemap.c:3927
 shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2895
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f48ea563a6f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f48e98e6e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000080000 RCX: 00007f48ea563a6f
RDX: 0000000000080000 RSI: 00007f48e14c7000 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000005d2
R10: 00000000000003c6 R11: 0000000000000293 R12: 0000000000000004
R13: 00007f48e98e6f3c R14: 00007f48e98e6f40 R15: 00007f48e14c7000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/07 06:33 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / dentry_name
* Struck through repros no longer work on HEAD.