syzbot


divide error in wg_packet_encrypt_worker

Status: fixed on 2020/04/15 17:19
Subsystems: wireguard
[Documentation on labels]
Fix commit: 175f1ca9a9ed wireguard: send: account for mtu=0 devices
First crash: 1582d, last: 1574d
Cause bisection: introduced by (bisect log) :
commit e7096c131e5161fa3b8e52a650d7719d2857adfd
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date: Sun Dec 8 23:27:34 2019 +0000

  net: WireGuard secure network tunnel

Crash: divide error in encrypt_packet (log)
Repro: C syz .config
  

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: wg-crypt-wg0 wg_packet_encrypt_worker
RIP: 0010:calculate_skb_padding drivers/net/wireguard/send.c:151 [inline]
RIP: 0010:encrypt_packet drivers/net/wireguard/send.c:168 [inline]
RIP: 0010:wg_packet_encrypt_worker+0x30b/0x13a0 drivers/net/wireguard/send.c:291
Code: 45 8b 7e 70 49 8d 7e 3c 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 0c 09 00 00 41 8b 5e 3c 44 89 7c 24 20 44 89 f8 31 d2 <f7> f3 4c 89 74 24 08 41 89 d6 45 8d 66 0f 41 83 e4 f0 44 89 e7 89
RSP: 0018:ffffc90000cbf880 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff815c2ca7
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88808de8253c
RBP: ffffc90000cbfcd8 R08: ffff8880a999e998 R09: fffffbfff140632e
R10: fffffbfff140632e R11: 0000000000000000 R12: 0000000000000400
R13: dffffc0000000000 R14: ffff88808de82500 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe1a9d7be0 CR3: 000000009e006000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264
 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410
 kthread+0x332/0x350 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Modules linked in:
---[ end trace 78d4049639479f09 ]---
RIP: 0010:calculate_skb_padding drivers/net/wireguard/send.c:151 [inline]
RIP: 0010:encrypt_packet drivers/net/wireguard/send.c:168 [inline]
RIP: 0010:wg_packet_encrypt_worker+0x30b/0x13a0 drivers/net/wireguard/send.c:291
Code: 45 8b 7e 70 49 8d 7e 3c 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 0c 09 00 00 41 8b 5e 3c 44 89 7c 24 20 44 89 f8 31 d2 <f7> f3 4c 89 74 24 08 41 89 d6 45 8d 66 0f 41 83 e4 f0 44 89 e7 89
RSP: 0018:ffffc90000cbf880 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff815c2ca7
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88808de8253c
RBP: ffffc90000cbfcd8 R08: ffff8880a999e998 R09: fffffbfff140632e
R10: fffffbfff140632e R11: 0000000000000000 R12: 0000000000000400
R13: dffffc0000000000 R14: ffff88808de82500 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe1a9d7be0 CR3: 000000009e006000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/16 14:59 upstream db70e26e33ee cf914200 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/14 04:11 upstream 0bf999f9c5e7 c5ed587f .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/21 18:56 upstream ca7e1fd1026c bd2a74a3 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/18 20:07 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/18 20:06 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/18 20:03 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/18 19:53 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/18 18:26 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/17 20:09 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/17 20:09 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/16 13:35 upstream db70e26e33ee cf914200 .config console log report ci-upstream-kasan-gce-smack-root
2020/02/14 17:06 upstream b19e8c684703 5d7b90f1 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.