UBSAN: undefined-behaviour in cbq_dequeue

9 views
Skip to first unread message

syzbot

unread,
Sep 20, 2020, 10:43:17 AM9/20/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=149b97b5900000
kernel config: https://syzkaller.appspot.com/x/.config?x=243dd74ad58a8a57
dashboard link: https://syzkaller.appspot.com/bug?extid=f2984924f8a9e06166a2
compiler: gcc (GCC) 10.1.0-syz 20200507

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

================================================================================
UBSAN: Undefined behaviour in ./include/net/sch_generic.h:1051:7
shift exponent 129 is too large for 32-bit type 'int'
CPU: 1 PID: 9462 Comm: syz-executor.0 Not tainted 4.19.146-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
qdisc_l2t include/net/sch_generic.h:1051 [inline]
cbq_update net/sched/sch_cbq.c:567 [inline]
cbq_dequeue.cold+0x189/0x18e net/sched/sch_cbq.c:814
dequeue_skb net/sched/sch_generic.c:282 [inline]
qdisc_restart net/sched/sch_generic.c:385 [inline]
__qdisc_run+0x1b9/0x1670 net/sched/sch_generic.c:403
__dev_xmit_skb net/core/dev.c:3500 [inline]
__dev_queue_xmit+0x15ef/0x2ec0 net/core/dev.c:3807
neigh_hh_output include/net/neighbour.h:491 [inline]
neigh_output include/net/neighbour.h:499 [inline]
ip_finish_output2+0xc04/0x1640 net/ipv4/ip_output.c:229
ip_finish_output+0x88e/0xd80 net/ipv4/ip_output.c:317
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip_output+0x203/0x650 net/ipv4/ip_output.c:405
dst_output include/net/dst.h:455 [inline]
ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:124
iptunnel_xmit+0x63e/0xa30 net/ipv4/ip_tunnel_core.c:91
geneve_xmit_skb drivers/net/geneve.c:857 [inline]
geneve_xmit+0xeb4/0x2a20 drivers/net/geneve.c:929
__netdev_start_xmit include/linux/netdevice.h:4333 [inline]
netdev_start_xmit include/linux/netdevice.h:4347 [inline]
xmit_one net/core/dev.c:3256 [inline]
dev_hard_start_xmit+0x1a8/0x960 net/core/dev.c:3272
__dev_queue_xmit+0x276a/0x2ec0 net/core/dev.c:3838
neigh_resolve_output+0x55a/0x950 net/core/neighbour.c:1374
neigh_output include/net/neighbour.h:501 [inline]
ip6_finish_output2+0x1184/0x2370 net/ipv6/ip6_output.c:120
ip6_finish_output+0x610/0xcc0 net/ipv6/ip6_output.c:154
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip6_output+0x205/0x7c0 net/ipv6/ip6_output.c:171
dst_output include/net/dst.h:455 [inline]
NF_HOOK include/linux/netfilter.h:289 [inline]
ndisc_send_skb+0xa6b/0x1860 net/ipv6/ndisc.c:491
ndisc_send_rs+0x131/0x6a0 net/ipv6/ndisc.c:685
addrconf_rs_timer+0x2d9/0x640 net/ipv6/addrconf.c:3834
call_timer_fn+0x177/0x760 kernel/time/timer.c:1338
expire_timers+0x243/0x500 kernel/time/timer.c:1375
__run_timers kernel/time/timer.c:1703 [inline]
run_timer_softirq+0x259/0x730 kernel/time/timer.c:1716
__do_softirq+0x27d/0xad2 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x22d/0x270 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:544 [inline]
smp_apic_timer_interrupt+0x15f/0x5d0 arch/x86/kernel/apic/apic.c:1094
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
</IRQ>
RIP: 0010:memset_erms+0x9/0x10 arch/x86/lib/memset_64.S:66
Code: c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 f3 48 ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1 <f3> aa 4c 89 c8 c3 90 49 89 fa 40 0f b6 ce 48 b8 01 01 01 01 01 01
RSP: 0018:ffff88804b0bf608 EFLAGS: 00010206 ORIG_RAX: ffffffffffffff13
RAX: dffffc00000000ff RBX: 0000000000200000 RCX: 00000000000149c0
RDX: 0000000000040000 RSI: 00000000000000ff RDI: ffffed100442b640
RBP: 0000000000000200 R08: ffffed1004400000 R09: ffffed1004400000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000009
R13: 0000000000022000 R14: 0000000000022000 R15: ffffea0000880000
free_pages_prepare mm/page_alloc.c:1061 [inline]
__free_pages_ok+0x25c/0xe00 mm/page_alloc.c:1278
release_pages+0xac9/0x1650 mm/swap.c:768
tlb_flush_mmu_free mm/memory.c:249 [inline]
zap_pte_range mm/memory.c:1405 [inline]
zap_pmd_range mm/memory.c:1440 [inline]
zap_pud_range mm/memory.c:1469 [inline]
zap_p4d_range mm/memory.c:1490 [inline]
unmap_page_range+0x2264/0x2ec0 mm/memory.c:1511
unmap_single_vma+0x198/0x300 mm/memory.c:1556
unmap_vmas+0xa9/0x180 mm/memory.c:1586
exit_mmap+0x2b9/0x530 mm/mmap.c:3091
__mmput kernel/fork.c:1015 [inline]
mmput+0x14e/0x4a0 kernel/fork.c:1036
exit_mm kernel/exit.c:546 [inline]
do_exit+0xb12/0x2d80 kernel/exit.c:874
do_group_exit+0x125/0x320 kernel/exit.c:990
get_signal+0x3f3/0x2270 kernel/signal.c:2588
do_signal+0x8f/0x1690 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x204/0x2c0 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+0x57c/0x670 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45d5f9
Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f9f2f7a6cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000118cf48 RCX: 000000000045d5f9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000118cf48
RBP: 000000000118cf40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c
R13: 00007ffff390b29f R14: 00007f9f2f7a79c0 R15: 000000000118cf4c
================================================================================
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21


---
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,
Sep 20, 2020, 12:13:15 PM9/20/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15cf15d9900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16005809900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=114bdb07900000

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

netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
================================================================================
UBSAN: Undefined behaviour in ./include/net/sch_generic.h:1051:7
shift exponent 129 is too large for 32-bit type 'int'
CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ipv6_addrconf addrconf_dad_work
Call Trace:
ndisc_send_ns+0x51d/0x840 net/ipv6/ndisc.c:633
addrconf_dad_work+0xb78/0x1130 net/ipv6/addrconf.c:4075
process_one_work+0x796/0x14e0 kernel/workqueue.c:2155
worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
================================================================================
nla_parse: 1507 callbacks suppressed
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
nla_parse: 1632 callbacks suppressed
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.
netlink: 96 bytes leftover after parsing attributes in process `syz-executor216'.

Reply all
Reply to author
Forward
0 new messages