KASAN: global-out-of-bounds Read in macvlan_hard_header

8 views
Skip to first unread message

syzbot

unread,
Aug 20, 2020, 2:28:21 PM8/20/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4993e4fe Add linux-next specific files for 20200814
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=170809f6900000
kernel config: https://syzkaller.appspot.com/x/.config?x=2055bd0d83d5ee16
dashboard link: https://syzkaller.appspot.com/bug?extid=5136f0bd2e0d6cfdd3bd
compiler: gcc (GCC) 10.1.0-syz 20200507
CC: [da...@davemloft.net ku...@kernel.org linux-...@vger.kernel.org net...@vger.kernel.org]

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+5136f0...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: global-out-of-bounds in dev_hard_header include/linux/netdevice.h:3046 [inline]
BUG: KASAN: global-out-of-bounds in macvlan_hard_header+0x12b/0x150 drivers/net/macvlan.c:589
Read of size 8 at addr ffffffff8bf75650 by task syz-executor.0/6868

CPU: 0 PID: 6868 Comm: syz-executor.0 Not tainted 5.8.0-next-20200814-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+0x18f/0x20d lib/dump_stack.c:118
print_address_description.constprop.0.cold+0x5/0x497 mm/kasan/report.c:383
__kasan_report mm/kasan/report.c:513 [inline]
kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
dev_hard_header include/linux/netdevice.h:3046 [inline]
macvlan_hard_header+0x12b/0x150 drivers/net/macvlan.c:589
dev_hard_header include/linux/netdevice.h:3049 [inline]
neigh_resolve_output net/core/neighbour.c:1484 [inline]
neigh_resolve_output+0x39e/0x6a0 net/core/neighbour.c:1469
neigh_output include/net/neighbour.h:509 [inline]
ip6_finish_output2+0x8b6/0x17b0 net/ipv6/ip6_output.c:117
__ip6_finish_output net/ipv6/ip6_output.c:143 [inline]
__ip6_finish_output+0x447/0xab0 net/ipv6/ip6_output.c:128
ip6_finish_output+0x34/0x1f0 net/ipv6/ip6_output.c:153
NF_HOOK_COND include/linux/netfilter.h:290 [inline]
ip6_output+0x1db/0x520 net/ipv6/ip6_output.c:176
dst_output include/net/dst.h:443 [inline]
NF_HOOK include/linux/netfilter.h:301 [inline]
NF_HOOK include/linux/netfilter.h:295 [inline]
mld_sendpack+0x92a/0xdb0 net/ipv6/mcast.c:1679
mld_send_cr net/ipv6/mcast.c:1975 [inline]
mld_ifc_timer_expire+0x60a/0xf10 net/ipv6/mcast.c:2474
call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1413
expire_timers kernel/time/timer.c:1458 [inline]
__run_timers.part.0+0x67c/0xaa0 kernel/time/timer.c:1755
__run_timers kernel/time/timer.c:1736 [inline]
run_timer_softirq+0xae/0x1a0 kernel/time/timer.c:1768
__do_softirq+0x2de/0xa24 kernel/softirq.c:298
asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:393 [inline]
__irq_exit_rcu kernel/softirq.c:423 [inline]
irq_exit_rcu+0x1f3/0x230 kernel/softirq.c:435
sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x4b/0x80 kernel/locking/spinlock.c:199
Code: c0 18 35 b6 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d b6 8d bf 01 00 74 25 fb 66 0f 1f 44 00 00 <bf> 01 00 00 00 e8 bb 0b 59 f9 65 8b 05 04 57 0b 78 85 c0 74 02 5d
RSP: 0018:ffffc900051e76a8 EFLAGS: 00000286
RAX: 1ffffffff136c6a3 RBX: ffff8880a43ca3c0 RCX: 0000000000000006
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffffffff87f6a73f
RBP: ffff8880ae635e00 R08: 0000000000000001 R09: ffffffff8c68b9f7
R10: fffffbfff18d173e R11: 0000000000000000 R12: ffff8880ae635e00
R13: ffff88803db90140 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:3517 [inline]
finish_task_switch+0x147/0x750 kernel/sched/core.c:3617
context_switch kernel/sched/core.c:3781 [inline]
__schedule+0x8ed/0x21e0 kernel/sched/core.c:4527
preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:4683
preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:40
__raw_spin_unlock include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock+0x36/0x40 kernel/locking/spinlock.c:183
spin_unlock include/linux/spinlock.h:394 [inline]
copy_pte_range mm/memory.c:863 [inline]
copy_pmd_range mm/memory.c:903 [inline]
copy_pud_range mm/memory.c:937 [inline]
copy_p4d_range mm/memory.c:959 [inline]
copy_page_range+0x14f4/0x26a0 mm/memory.c:1021
dup_mmap kernel/fork.c:592 [inline]
dup_mm+0x98f/0x1300 kernel/fork.c:1353
copy_mm kernel/fork.c:1409 [inline]
copy_process+0x28e4/0x6920 kernel/fork.c:2068
_do_fork+0xe8/0xb10 kernel/fork.c:2427
__do_sys_clone+0xc8/0x110 kernel/fork.c:2544
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45b80a
Code: f7 d8 64 89 04 25 d4 02 00 00 64 4c 8b 0c 25 10 00 00 00 31 d2 4d 8d 91 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 f5 00 00 00 85 c0 41 89 c5 0f 85 fc 00 00
RSP: 002b:00007ffd38d87300 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ffd38d87300 RCX: 000000000045b80a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007ffd38d87340 R08: 0000000000000001 R09: 00000000034d5940
R10: 00000000034d5c10 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffd38d87390

The buggy address belongs to the variable:
nr_free_chain_hlocks+0x30/0x40

Memory state around the buggy address:
ffffffff8bf75500: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
ffffffff8bf75580: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
>ffffffff8bf75600: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
^
ffffffff8bf75680: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
ffffffff8bf75700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
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,
Oct 15, 2020, 2:25:11 PM10/15/20
to syzkaller-upst...@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