syzbot


KCSAN: data-race in read_pages / read_pages

Status: auto-closed as invalid on 2022/07/30 19:54
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 160d, last: 160d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in read_pages / read_pages

read-write to 0xffff8881389e9da0 of 4 bytes by task 18912 on cpu 1:
 read_pages+0x3cf/0x790 mm/readahead.c:168
 page_cache_ra_unbounded+0x2a8/0x2e0 mm/readahead.c:263
 do_page_cache_ra mm/readahead.c:293 [inline]
 page_cache_ra_order+0xd1/0xe0 mm/readahead.c:550
 do_sync_mmap_readahead+0x31e/0x370 mm/filemap.c:3056
 filemap_fault+0x197/0x740 mm/filemap.c:3148
 __do_fault mm/memory.c:4165 [inline]
 do_read_fault mm/memory.c:4511 [inline]
 do_fault+0x500/0xb20 mm/memory.c:4640
 handle_pte_fault mm/memory.c:4903 [inline]
 __handle_mm_fault mm/memory.c:5042 [inline]
 handle_mm_fault+0x889/0xa90 mm/memory.c:5140
 faultin_page mm/gup.c:953 [inline]
 __get_user_pages+0x34a/0xbf0 mm/gup.c:1174
 populate_vma_page_range mm/gup.c:1518 [inline]
 __mm_populate+0x26e/0x3a0 mm/gup.c:1631
 mm_populate include/linux/mm.h:2706 [inline]
 vm_mmap_pgoff+0x160/0x1f0 mm/util.c:557
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1633
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read-write to 0xffff8881389e9da0 of 4 bytes by task 18892 on cpu 0:
 read_pages+0x3cf/0x790 mm/readahead.c:168
 page_cache_ra_unbounded+0x2a8/0x2e0 mm/readahead.c:263
 do_page_cache_ra mm/readahead.c:293 [inline]
 page_cache_ra_order+0xd1/0xe0 mm/readahead.c:550
 do_sync_mmap_readahead+0x31e/0x370 mm/filemap.c:3056
 filemap_fault+0x197/0x740 mm/filemap.c:3148
 __do_fault mm/memory.c:4165 [inline]
 do_read_fault mm/memory.c:4511 [inline]
 do_fault+0x500/0xb20 mm/memory.c:4640
 handle_pte_fault mm/memory.c:4903 [inline]
 __handle_mm_fault mm/memory.c:5042 [inline]
 handle_mm_fault+0x889/0xa90 mm/memory.c:5140
 do_user_addr_fault+0x4cd/0x940 arch/x86/mm/fault.c:1397
 handle_page_fault arch/x86/mm/fault.c:1484 [inline]
 exc_page_fault+0x60/0x160 arch/x86/mm/fault.c:1540
 asm_exc_page_fault+0x27/0x30
 copy_user_short_string+0xa/0x40
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline]
 _copy_from_user+0x78/0xc0 lib/usercopy.c:16
 copy_from_user include/linux/uaccess.h:152 [inline]
 __copy_msghdr_from_user net/socket.c:2374 [inline]
 copy_msghdr_from_user net/socket.c:2425 [inline]
 sendmsg_copy_msghdr+0x60/0x290 net/socket.c:2523
 ___sys_sendmsg net/socket.c:2542 [inline]
 __sys_sendmmsg+0x246/0x4a0 net/socket.c:2632
 __do_sys_sendmmsg net/socket.c:2661 [inline]
 __se_sys_sendmmsg net/socket.c:2658 [inline]
 __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2658
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x00000015 -> 0x00000020

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 18892 Comm: syz-executor.5 Not tainted 5.19.0-rc3-syzkaller-00279-g8c23f235a6a8-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/25 19:46 upstream 8c23f235a6a8 a371c43c .config log report info KCSAN: data-race in read_pages / read_pages
* Struck through repros no longer work on HEAD.