UBSAN: undefined-behaviour in __qdisc_calculate_pkt_len

4 views
Skip to first unread message

syzbot

unread,
Sep 20, 2020, 8:09:21 PM9/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=15250707900000
kernel config: https://syzkaller.appspot.com/x/.config?x=243dd74ad58a8a57
dashboard link: https://syzkaller.appspot.com/bug?extid=45cd53c935be1e17da97
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+45cd53...@syzkaller.appspotmail.com

================================================================================
UBSAN: Undefined behaviour in net/sched/sch_api.c:561:7
shift exponent 129 is too large for 32-bit type 'int'
CPU: 0 PID: 0 Comm: swapper/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_calculate_pkt_len+0x3bb/0x570 net/sched/sch_api.c:561
qdisc_calculate_pkt_len include/net/sch_generic.h:697 [inline]
__dev_xmit_skb net/core/dev.c:3443 [inline]
__dev_queue_xmit+0x1372/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:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
Code: e9 73 fd ff ff 48 89 df e8 3f 83 fc f9 e9 59 ff ff ff 90 90 90 90 90 90 90 90 90 90 e9 07 00 00 00 0f 00 2d c4 d9 59 00 fb f4 <c3> 90 e9 07 00 00 00 0f 00 2d b4 d9 59 00 f4 c3 90 90 41 56 41 55
RSP: 0018:ffffffff89407d40 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff12c7138 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff89481284
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff896389b0
R13: 1ffffffff1280fb2 R14: 0000000000000000 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline]
default_idle+0x49/0x320 arch/x86/kernel/process.c:557
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x2f8/0x500 kernel/sched/idle.c:263
cpu_startup_entry+0xc5/0xd6 kernel/sched/idle.c:369
start_kernel+0x93d/0x978 init/main.c:736
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243
================================================================================


---
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, 8:24:16 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=117c89ab900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13174f3b900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13184b07900000

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

batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
================================================================================
UBSAN: Undefined behaviour in net/sched/sch_api.c:561: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

Reply all
Reply to author
Forward
0 new messages