syzbot


divide error in encrypt_packet

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: 1585d, last: 1576d
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: 12 Comm: kworker/0:1 Not tainted 5.6.0-rc2-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+0xf8/0x920 drivers/net/wireguard/send.c:168
Code: 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 49 06 00 00 8b 4b 3c 44 89 f0 31 d2 48 89 df <f7> f1 44 8d 62 0f 41 83 e4 f0 44 39 e1 44 0f 46 e1 41 29 d4 45 8d
RSP: 0018:ffffc90000d2f7a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880a8a6e440 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff84ba491f RDI: ffff8880a8a6e440
RBP: ffffc90000d2fc08 R08: 1ffffffff16a3385 R09: fffffbfff16a3386
R10: fffffbfff16a3385 R11: ffffffff8b519c2f R12: dffffc0000000000
R13: ffffc90000d2fbe0 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe724a8c40 CR3: 000000009dd60000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 wg_packet_encrypt_worker+0x33f/0xe00 drivers/net/wireguard/send.c:291
 process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264
 worker_thread+0x98/0xe40 kernel/workqueue.c:2410
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Modules linked in:
---[ end trace c9beb00afb20fc0b ]---
RIP: 0010:calculate_skb_padding drivers/net/wireguard/send.c:151 [inline]
RIP: 0010:encrypt_packet+0xf8/0x920 drivers/net/wireguard/send.c:168
Code: 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 49 06 00 00 8b 4b 3c 44 89 f0 31 d2 48 89 df <f7> f1 44 8d 62 0f 41 83 e4 f0 44 39 e1 44 0f 46 e1 41 29 d4 45 8d
RSP: 0018:ffffc90000d2f7a8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880a8a6e440 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff84ba491f RDI: ffff8880a8a6e440
RBP: ffffc90000d2fc08 R08: 1ffffffff16a3385 R09: fffffbfff16a3386
R10: fffffbfff16a3385 R11: ffffffff8b519c2f R12: dffffc0000000000
R13: ffffc90000d2fbe0 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe724a8c40 CR3: 0000000099d7d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (89):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/19 11:38 upstream 0a44cac81050 135c18aa .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/17 20:14 upstream 11a48a5a18c6 2b411596 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/16 17:16 upstream db70e26e33ee cf914200 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/16 13:15 upstream db70e26e33ee cf914200 .config console log report syz C ci-upstream-kasan-gce
2020/02/15 10:45 upstream 2019fc96af22 5d7b90f1 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/14 02:56 upstream 0bf999f9c5e7 c5ed587f .config console log report syz C ci-upstream-kasan-gce
2020/02/16 06:42 upstream 829e69446995 5d7b90f1 .config console log report syz C ci-upstream-kasan-gce-386
2020/02/14 04:51 upstream 0bf999f9c5e7 c5ed587f .config console log report syz C ci-upstream-kasan-gce-386
2020/02/16 02:56 net-old 2019fc96af22 5d7b90f1 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/02/16 03:55 net-next-old 2019fc96af22 5d7b90f1 .config console log report syz C ci-upstream-net-kasan-gce
2020/02/21 18:49 upstream ca7e1fd1026c bd2a74a3 .config console log report ci-upstream-kasan-gce-root
2020/02/18 19:48 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce
2020/02/18 17:46 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce
2020/02/18 17:44 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-selinux-root
2020/02/18 17:44 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-root
2020/02/17 22:20 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-selinux-root
2020/02/17 20:17 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-selinux-root
2020/02/17 19:58 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce
2020/02/17 19:56 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce
2020/02/17 19:56 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-selinux-root
2020/02/17 17:49 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-root
2020/02/16 19:20 upstream db70e26e33ee cf914200 .config console log report ci-upstream-kasan-gce-root
2020/02/15 16:41 upstream 2019fc96af22 5d7b90f1 .config console log report ci-upstream-kasan-gce
2020/02/14 00:27 upstream 0bf999f9c5e7 c5ed587f .config console log report ci-upstream-kasan-gce
2020/02/21 21:57 upstream ca7e1fd1026c 2ffa6679 .config console log report ci-upstream-kasan-gce-386
2020/02/20 15:41 upstream ca7e1fd1026c 81230308 .config console log report ci-upstream-kasan-gce-386
2020/02/18 18:04 upstream b1da3acc781c 012fbc32 .config console log report ci-upstream-kasan-gce-386
2020/02/17 20:20 upstream 11a48a5a18c6 2b411596 .config console log report ci-upstream-kasan-gce-386
2020/02/17 20:13 net-old 0d4597c8c5ab 2b411596 .config console log report ci-upstream-net-this-kasan-gce
2020/02/17 19:54 net-old 0d4597c8c5ab 2b411596 .config console log report ci-upstream-net-this-kasan-gce
2020/02/16 05:23 net-old 2019fc96af22 5d7b90f1 .config console log report ci-upstream-net-this-kasan-gce
2020/02/15 20:20 net-old 2019fc96af22 5d7b90f1 .config console log report ci-upstream-net-this-kasan-gce
2020/02/22 09:47 net-next-old 5f9721a2d119 2ffa6679 .config console log report ci-upstream-net-kasan-gce
2020/02/22 07:28 net-next-old 5f9721a2d119 2ffa6679 .config console log report ci-upstream-net-kasan-gce
2020/02/22 00:23 net-next-old 5f9721a2d119 2ffa6679 .config console log report ci-upstream-net-kasan-gce
2020/02/21 20:11 net-next-old 5f9721a2d119 2ffa6679 .config console log report ci-upstream-net-kasan-gce
2020/02/20 21:31 net-next-old 2e92a2d0e450 bd2a74a3 .config console log report ci-upstream-net-kasan-gce
2020/02/20 09:34 net-next-old 2bb07f4e1d86 81230308 .config console log report ci-upstream-net-kasan-gce
2020/02/19 12:40 net-next-old 00796b929ce8 135c18aa .config console log report ci-upstream-net-kasan-gce
2020/02/18 20:27 net-next-old b182a66792fe 012fbc32 .config console log report ci-upstream-net-kasan-gce
2020/02/18 19:47 net-next-old b182a66792fe 012fbc32 .config console log report ci-upstream-net-kasan-gce
2020/02/17 20:14 net-next-old ce7805513d90 2b411596 .config console log report ci-upstream-net-kasan-gce
2020/02/17 19:54 net-next-old ce7805513d90 2b411596 .config console log report ci-upstream-net-kasan-gce
2020/02/17 19:53 net-next-old ce7805513d90 2b411596 .config console log report ci-upstream-net-kasan-gce
2020/02/17 05:05 net-next-old 2019fc96af22 1f448cd6 .config console log report ci-upstream-net-kasan-gce
2020/02/16 06:45 net-next-old 2019fc96af22 5d7b90f1 .config console log report ci-upstream-net-kasan-gce
2020/02/14 20:51 net-next-old fdfa3a6778b1 5d7b90f1 .config console log report ci-upstream-net-kasan-gce
2020/02/14 03:59 net-next-old fdfa3a6778b1 c5ed587f .config console log report ci-upstream-net-kasan-gce
2020/02/14 02:48 net-next-old fdfa3a6778b1 c5ed587f .config console log report ci-upstream-net-kasan-gce
2020/02/17 19:58 linux-next c25a951c50dc 2b411596 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/02/17 19:58 linux-next c25a951c50dc 2b411596 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/02/15 17:06 linux-next 9f01828e9e16 5d7b90f1 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/02/15 00:30 linux-next 9f01828e9e16 5d7b90f1 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.