syzbot


KCSAN: data-race in data_alloc / data_push_tail (3)

Status: moderation: reported on 2024/09/08 06:11
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+faa791a3223590f7f155@syzkaller.appspotmail.com
First crash: 164d, last: 6d20h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_alloc / data_push_tail (2) batman 44 210d 354d 0/28 auto-obsoleted due to no activity on 2024/08/28 06:32
upstream KCSAN: data-race in data_alloc / data_push_tail ext4 94 665d 1128d 0/28 auto-obsoleted due to no activity on 2023/05/31 17:30

Sample crash report:
loop1: detected capacity change from 0 to 1024
EXT4-fs (loop1): ext4_check_descriptors: Inode bitmap for group 0 overlaps block group descriptors
EXT4-fs (loop1): ext4_check_descriptors: Checksum for group 0 failed (51554!=20869)
==================================================================
BUG: KCSAN: data-race in data_alloc / data_push_tail

write to 0xffffffff88bbce08 of 8 bytes by task 9116 on cpu 1:
 data_alloc+0x216/0x2c0 kernel/printk/printk_ringbuffer.c:1082
 prb_reserve+0x85e/0xb60 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x558/0x870 kernel/printk/printk.c:2326
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408
 dev_vprintk_emit+0x1df/0x210 drivers/base/core.c:4890
 dev_printk_emit+0x82/0xb0 drivers/base/core.c:4901
 __dev_printk+0xf6/0x110 drivers/base/core.c:4913
 _dev_err+0x99/0xc0 drivers/base/core.c:4956
 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:599 [inline]
 raw_ioctl+0x18a5/0x1b40 drivers/usb/gadget/legacy/raw_gadget.c:1306
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:892
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:892
 x64_sys_call+0x1690/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88bbce08 of 8 bytes by task 9119 on cpu 0:
 data_make_reusable kernel/printk/printk_ringbuffer.c:594 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:679
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1054
 prb_reserve+0x85e/0xb60 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x558/0x870 kernel/printk/printk.c:2326
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2447
 vprintk+0x1d/0x30 kernel/printk/printk_safe.c:82
 _printk+0x7a/0xa0 kernel/printk/printk.c:2457
 __ext4_msg+0x18e/0x1a0 fs/ext4/super.c:998
 ext4_check_descriptors fs/ext4/super.c:3364 [inline]
 ext4_group_desc_init+0x10ab/0x12c0 fs/ext4/super.c:4888
 __ext4_fill_super fs/ext4/super.c:5331 [inline]
 ext4_fill_super+0x21cc/0x3650 fs/ext4/super.c:5722
 get_tree_bdev_flags+0x29f/0x310 fs/super.c:1636
 get_tree_bdev+0x1f/0x30 fs/super.c:1659
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5754
 vfs_get_tree+0x56/0x1e0 fs/super.c:1814
 do_new_mount+0x227/0x690 fs/namespace.c:3560
 path_mount+0x49b/0xb30 fs/namespace.c:3887
 do_mount fs/namespace.c:3900 [inline]
 __do_sys_mount fs/namespace.c:4111 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:4088
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4088
 x64_sys_call+0x2c84/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000ffffe013 -> 0x00000000ffffec5e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 9119 Comm: syz.1.2514 Not tainted 6.14.0-rc2-syzkaller-00041-g4dc1d1bec898 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================
JBD2: no valid journal superblock found
EXT4-fs (loop1): Could not load journal inode

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/12 23:24 upstream 4dc1d1bec898 b27c2402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2025/02/06 19:11 upstream 92514ef226f5 8002dd28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2025/01/08 08:35 upstream 09a0fa92e5b4 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2025/01/06 00:32 upstream 9244696b34f2 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2025/01/03 10:02 upstream 0bc21e701a6f d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/12/21 04:03 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/12/07 14:13 upstream b5f217084ab3 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/10/31 20:58 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/09/30 07:01 upstream 9852d85ec9d4 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/09/19 04:05 upstream 4a39ac5b7d62 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/09/17 10:28 upstream a430d95c5efa c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
2024/09/08 06:10 upstream d1f2d51b711a 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / data_push_tail
* Struck through repros no longer work on HEAD.