KASAN: user-memory-access Write in do_profile_hits

7 views
Skip to first unread message

syzbot

unread,
Mar 1, 2022, 1:05:21 AM3/1/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=167c8d4e700000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=50f9d2f5925d1597eb22
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+50f9d2...@syzkaller.appspotmail.com

team0: Port device team_slave_0 removed
netlink: 16 bytes leftover after parsing attributes in process `syz-executor.2'.
==================================================================
BUG: KASAN: user-memory-access in atomic_add include/asm-generic/atomic-instrumented.h:143 [inline]
BUG: KASAN: user-memory-access in do_profile_hits.constprop.0+0x2ae/0x610 kernel/profile.c:324
Write of size 4 at addr 00000007fffc4418 by task syz-executor.2/2878

CPU: 1 PID: 2878 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
kasan_report_error.cold+0x15b/0x1b9 mm/kasan/report.c:352
kasan_report+0x8f/0xa0 mm/kasan/report.c:412
atomic_add include/asm-generic/atomic-instrumented.h:143 [inline]
do_profile_hits.constprop.0+0x2ae/0x610 kernel/profile.c:324
profile_hits kernel/profile.c:398 [inline]
profile_hit include/linux/profile.h:64 [inline]
profile_tick+0xd7/0xf0 kernel/profile.c:408
tick_sched_timer+0xfc/0x290 kernel/time/tick-sched.c:1278
__run_hrtimer kernel/time/hrtimer.c:1465 [inline]
__hrtimer_run_queues+0x3f6/0xe60 kernel/time/hrtimer.c:1527
hrtimer_interrupt+0x326/0x9e0 kernel/time/hrtimer.c:1585
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1071 [inline]
smp_apic_timer_interrupt+0x10c/0x550 arch/x86/kernel/apic/apic.c:1096
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
</IRQ>
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x50/0x80 kernel/locking/spinlock.c:192
Code: c0 98 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 01 31 d8 01 00 74 25 fb 66 0f 1f 44 00 00 <bf> 01 00 00 00 e8 26 1b 28 f9 65 8b 05 9f 8d e8 77 85 c0 74 02 5d
RSP: 0018:ffff8880937275a0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13e3053 RBX: ffff888048338480 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff888048338d04
RBP: ffff8880ba12b0c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ba12b0c0
R13: ffff8880a9cca140 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:2578 [inline]
finish_task_switch+0x146/0x760 kernel/sched/core.c:2678
context_switch kernel/sched/core.c:2831 [inline]
__schedule+0x88f/0x2040 kernel/sched/core.c:3517
preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:3641
___preempt_schedule+0x16/0x18
__raw_spin_unlock include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock+0x3b/0x40 kernel/locking/spinlock.c:176
spin_unlock include/linux/spinlock.h:369 [inline]
zap_pte_range mm/memory.c:1407 [inline]
zap_pmd_range mm/memory.c:1463 [inline]
zap_pud_range mm/memory.c:1492 [inline]
zap_p4d_range mm/memory.c:1513 [inline]
unmap_page_range+0x1616/0x2c50 mm/memory.c:1534
unmap_single_vma+0x198/0x300 mm/memory.c:1579
unmap_vmas+0xa9/0x180 mm/memory.c:1609
exit_mmap+0x2b9/0x530 mm/mmap.c:3093
__mmput kernel/fork.c:1016 [inline]
mmput+0x14e/0x4a0 kernel/fork.c:1037
exit_mm kernel/exit.c:549 [inline]
do_exit+0xaec/0x2be0 kernel/exit.c:857
do_group_exit+0x125/0x310 kernel/exit.c:967
get_signal+0x3f2/0x1f70 kernel/signal.c:2589
do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f72e09d4049
Code: Bad RIP value.
RSP: 002b:00007f72df349168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: 0000000000000034 RBX: 00007f72e0ae6f60 RCX: 00007f72e09d4049
RDX: 0000000000000000 RSI: 0000000020000200 RDI: 0000000000000005
RBP: 00007f72e0a2e08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc8dfb30f R14: 00007f72df349300 R15: 0000000000022000
==================================================================
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
7: fc ff df
a: 48 c1 e8 03 shr $0x3,%rax
e: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1)
12: 75 31 jne 0x45
14: 48 83 3d 01 31 d8 01 cmpq $0x0,0x1d83101(%rip) # 0x1d8311d
1b: 00
1c: 74 25 je 0x43
1e: fb sti
1f: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
* 25: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2a: e8 26 1b 28 f9 callq 0xf9281b55
2f: 65 8b 05 9f 8d e8 77 mov %gs:0x77e88d9f(%rip),%eax # 0x77e88dd5
36: 85 c0 test %eax,%eax
38: 74 02 je 0x3c
3a: 5d pop %rbp


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 5, 2022, 9:55:27 AM7/5/22
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages