syzbot


KASAN: user-memory-access Write in profile_hits (2)

Status: auto-obsoleted due to no activity on 2023/02/07 02:54
Reported-by: syzbot+056fa43111252afa7726@syzkaller.appspotmail.com
First crash: 551d, last: 551d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: user-memory-access Write in profile_hits 1 826d 826d 0/2 auto-closed as invalid on 2022/05/08 09:48
upstream KMSAN: uninit-value in profile_hits (2) kernel 4 862d 873d 0/26 auto-closed as invalid on 2022/03/03 02:13
upstream KMSAN: uninit-value in profile_hits (3) kernel C 218 16h13m 108d 0/26 upstream: reported C repro on 2023/12/26 15:59
upstream KMSAN: uninit-value in profile_hits kernel C 43 999d 999d 0/26 closed as invalid on 2021/07/19 13:31

Sample crash report:
==================================================================
BUG: KASAN: user-memory-access in atomic_add include/asm-generic/atomic-instrumented.h:62 [inline]
BUG: KASAN: user-memory-access in do_profile_hits kernel/profile.c:325 [inline]
BUG: KASAN: user-memory-access in profile_hits+0x81e/0xa40 kernel/profile.c:399
Write of size 4 at addr 00000006ffffe010 by task syz-executor.0/21307

CPU: 0 PID: 21307 Comm: syz-executor.0 Not tainted 5.4.210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18e/0x1d5 lib/dump_stack.c:118
 __kasan_report+0xec/0x130 mm/kasan/report.c:520
 kasan_report+0x30/0x60 mm/kasan/common.c:653
 check_memory_region_inline mm/kasan/generic.c:141 [inline]
 check_memory_region+0x298/0x2d0 mm/kasan/generic.c:191
 atomic_add include/asm-generic/atomic-instrumented.h:62 [inline]
 do_profile_hits kernel/profile.c:325 [inline]
 profile_hits+0x81e/0xa40 kernel/profile.c:399
 tick_sched_handle kernel/time/tick-sched.c:172 [inline]
 tick_sched_timer+0x269/0x410 kernel/time/tick-sched.c:1296
 __run_hrtimer+0x187/0x7c0 kernel/time/hrtimer.c:1581
 __hrtimer_run_queues kernel/time/hrtimer.c:1643 [inline]
 hrtimer_interrupt+0x557/0x1070 kernel/time/hrtimer.c:1705
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1123 [inline]
 smp_apic_timer_interrupt+0x109/0x440 arch/x86/kernel/apic/apic.c:1148
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831
 </IRQ>
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x45/0x60 kernel/locking/spinlock.c:199
Code: 08 00 74 0c 48 c7 c7 d0 cd aa 85 e8 a5 15 6d fd 48 83 3d 7d d8 8a 01 00 74 29 48 89 df e8 93 87 29 fd 66 90 fb bf 01 00 00 00 <e8> b6 f9 22 fd 65 8b 05 1b 98 e2 7b 85 c0 74 02 5b c3 e8 84 4c e0
RSP: 0018:ffff88819f207178 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: ffff8881a49ef568 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff8881a49ef5c0 R08: ffffffff821d1134 R09: ffffed1033e40e2a
R10: ffffed1033e40e2a R11: 1ffff11033e40e29 R12: 0000000000000cc0
R13: ffff88819f2071e8 R14: 0000000000000cc0 R15: ffffea0006661cc0
 spin_unlock_irq include/linux/spinlock.h:388 [inline]
 __add_to_page_cache_locked+0x49b/0x820 mm/filemap.c:915
 add_to_page_cache_lru+0xcf/0x260 mm/filemap.c:962
 pagecache_get_page+0x539/0x760 mm/filemap.c:1701
 grab_cache_page_write_begin+0x50/0x90 mm/filemap.c:3261
 ext4_da_write_begin+0x52b/0xef0 fs/ext4/inode.c:3137
 generic_perform_write+0x290/0x510 mm/filemap.c:3311
 __generic_file_write_iter+0x239/0x490 mm/filemap.c:3440
 ext4_file_write_iter+0x46e/0x1040 fs/ext4/file.c:270
 call_write_iter include/linux/fs.h:1976 [inline]
 new_sync_write fs/read_write.c:483 [inline]
 __vfs_write+0x4f9/0x6a0 fs/read_write.c:496
 __kernel_write+0x12c/0x340 fs/read_write.c:515
 dump_emit+0x1cc/0x2d0 fs/coredump.c:838
 elf_core_dump+0x39f1/0x42a0 fs/binfmt_elf.c:2352
 do_coredump+0x1d70/0x2ca0 fs/coredump.c:801
 get_signal+0xd5b/0x13f0 kernel/signal.c:2729
 do_signal+0x41/0x10a0 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0xdd/0x1d0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode+0x17c/0x1d0 arch/x86/entry/common.c:194
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fcfc4a75707
Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b
RSP: 002b:00007fcfc3c37e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffe5 RBX: 0000000000000008 RCX: 00007fcfc4a75707
RDX: 0000000000001000 RSI: 0000000020003480 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: ffffffff00000000
R10: 0000000080000000 R11: 0000000000000293 R12: 0000000000000003
R13: 0000000020001b98 R14: 0000000000000001 R15: 00007fcfc4b0da20
==================================================================
BUG: unable to handle page fault for address: 00000006ffffe010
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 1e4832067 P4D 1e4832067 PUD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 21307 Comm: syz-executor.0 Tainted: G    B             5.4.210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:arch_atomic_add arch/x86/include/asm/atomic.h:55 [inline]
RIP: 0010:atomic_add include/asm-generic/atomic-instrumented.h:63 [inline]
RIP: 0010:do_profile_hits kernel/profile.c:325 [inline]
RIP: 0010:profile_hits+0x821/0xa40 kernel/profile.c:399
Code: 02 00 00 48 83 c4 48 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 8b 1d 40 ac 6b 05 4a 8d 3c a3 be 04 00 00 00 e8 32 35 3c 00 8b 04 24 <f0> 42 01 04 a3 48 8b 6c 24 18 31 db 48 89 ea 48 89 5c 24 28 48 8d
RSP: 0018:ffff8881f6e09d38 EFLAGS: 00010046
RAX: 0000000000000001 RBX: 0000000000000010 RCX: 0000000000010003
RDX: 0000000000000001 RSI: 0000000000000046 RDI: 0000000000000001
RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff0d7370d
R10: fffffbfff0d7370d R11: 1ffffffff0d7370c R12: 00000001bffff800
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  00007fcfc3c38700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000006ffffe010 CR3: 00000001eb533000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 tick_sched_handle kernel/time/tick-sched.c:172 [inline]
 tick_sched_timer+0x269/0x410 kernel/time/tick-sched.c:1296
 __run_hrtimer+0x187/0x7c0 kernel/time/hrtimer.c:1581
 __hrtimer_run_queues kernel/time/hrtimer.c:1643 [inline]
 hrtimer_interrupt+0x557/0x1070 kernel/time/hrtimer.c:1705
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1123 [inline]
 smp_apic_timer_interrupt+0x109/0x440 arch/x86/kernel/apic/apic.c:1148
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831
 </IRQ>
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x45/0x60 kernel/locking/spinlock.c:199
Code: 08 00 74 0c 48 c7 c7 d0 cd aa 85 e8 a5 15 6d fd 48 83 3d 7d d8 8a 01 00 74 29 48 89 df e8 93 87 29 fd 66 90 fb bf 01 00 00 00 <e8> b6 f9 22 fd 65 8b 05 1b 98 e2 7b 85 c0 74 02 5b c3 e8 84 4c e0
RSP: 0018:ffff88819f207178 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: ffff8881a49ef568 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff8881a49ef5c0 R08: ffffffff821d1134 R09: ffffed1033e40e2a
R10: ffffed1033e40e2a R11: 1ffff11033e40e29 R12: 0000000000000cc0
R13: ffff88819f2071e8 R14: 0000000000000cc0 R15: ffffea0006661cc0
 spin_unlock_irq include/linux/spinlock.h:388 [inline]
 __add_to_page_cache_locked+0x49b/0x820 mm/filemap.c:915
 add_to_page_cache_lru+0xcf/0x260 mm/filemap.c:962
 pagecache_get_page+0x539/0x760 mm/filemap.c:1701
 grab_cache_page_write_begin+0x50/0x90 mm/filemap.c:3261
 ext4_da_write_begin+0x52b/0xef0 fs/ext4/inode.c:3137
 generic_perform_write+0x290/0x510 mm/filemap.c:3311
 __generic_file_write_iter+0x239/0x490 mm/filemap.c:3440
 ext4_file_write_iter+0x46e/0x1040 fs/ext4/file.c:270
 call_write_iter include/linux/fs.h:1976 [inline]
 new_sync_write fs/read_write.c:483 [inline]
 __vfs_write+0x4f9/0x6a0 fs/read_write.c:496
 __kernel_write+0x12c/0x340 fs/read_write.c:515
 dump_emit+0x1cc/0x2d0 fs/coredump.c:838
 elf_core_dump+0x39f1/0x42a0 fs/binfmt_elf.c:2352
 do_coredump+0x1d70/0x2ca0 fs/coredump.c:801
 get_signal+0xd5b/0x13f0 kernel/signal.c:2729
 do_signal+0x41/0x10a0 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0xdd/0x1d0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode+0x17c/0x1d0 arch/x86/entry/common.c:194
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fcfc4a75707
Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b
RSP: 002b:00007fcfc3c37e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffe5 RBX: 0000000000000008 RCX: 00007fcfc4a75707
RDX: 0000000000001000 RSI: 0000000020003480 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: ffffffff00000000
R10: 0000000080000000 R11: 0000000000000293 R12: 0000000000000003
R13: 0000000020001b98 R14: 0000000000000001 R15: 00007fcfc4b0da20
Modules linked in:
CR2: 00000006ffffe010
---[ end trace be3e937e133e8f09 ]---
RIP: 0010:arch_atomic_add arch/x86/include/asm/atomic.h:55 [inline]
RIP: 0010:atomic_add include/asm-generic/atomic-instrumented.h:63 [inline]
RIP: 0010:do_profile_hits kernel/profile.c:325 [inline]
RIP: 0010:profile_hits+0x821/0xa40 kernel/profile.c:399
Code: 02 00 00 48 83 c4 48 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 8b 1d 40 ac 6b 05 4a 8d 3c a3 be 04 00 00 00 e8 32 35 3c 00 8b 04 24 <f0> 42 01 04 a3 48 8b 6c 24 18 31 db 48 89 ea 48 89 5c 24 28 48 8d
RSP: 0018:ffff8881f6e09d38 EFLAGS: 00010046
RAX: 0000000000000001 RBX: 0000000000000010 RCX: 0000000000010003
RDX: 0000000000000001 RSI: 0000000000000046 RDI: 0000000000000001
RBP: 0000000000000001 R08: dffffc0000000000 R09: fffffbfff0d7370d
R10: fffffbfff0d7370d R11: 1ffffffff0d7370c R12: 00000001bffff800
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  00007fcfc3c38700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000006ffffe010 CR3: 00000001eb533000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	08 00                	or     %al,(%rax)
   2:	74 0c                	je     0x10
   4:	48 c7 c7 d0 cd aa 85 	mov    $0xffffffff85aacdd0,%rdi
   b:	e8 a5 15 6d fd       	callq  0xfd6d15b5
  10:	48 83 3d 7d d8 8a 01 	cmpq   $0x0,0x18ad87d(%rip)        # 0x18ad895
  17:	00
  18:	74 29                	je     0x43
  1a:	48 89 df             	mov    %rbx,%rdi
  1d:	e8 93 87 29 fd       	callq  0xfd2987b5
  22:	66 90                	xchg   %ax,%ax
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 b6 f9 22 fd       	callq  0xfd22f9e5 <-- trapping instruction
  2f:	65 8b 05 1b 98 e2 7b 	mov    %gs:0x7be2981b(%rip),%eax        # 0x7be29851
  36:	85 c0                	test   %eax,%eax
  38:	74 02                	je     0x3c
  3a:	5b                   	pop    %rbx
  3b:	c3                   	retq
  3c:	e8                   	.byte 0xe8
  3d:	84                   	.byte 0x84
  3e:	4c                   	rex.WR
  3f:	e0                   	.byte 0xe0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/10 02:54 android12-5.4 cc4340dfc7b2 aea5da89 .config console log report info [disk image] [vmlinux] ci2-android-5-4-kasan KASAN: user-memory-access Write in profile_hits
* Struck through repros no longer work on HEAD.