syzbot


memory leak in wg_noise_handshake_begin_session

Status: closed as invalid on 2024/02/11 10:16
Subsystems: wireguard usb
[Documentation on labels]
First crash: 553d, last: 498d
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/02/10 12:16 16m retest repro upstream report log
2023/12/05 21:14 15m retest repro upstream report log
2023/12/01 16:13 15m edumazet@google.com upstream report log
2023/11/21 01:53 22m retest repro upstream report log
2023/09/26 20:29 18m retest repro upstream log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff88811a5fa800 (size 2048):
  comm "kworker/1:13", pid 5275, jiffies 4295045664 (age 139.480s)
  hex dump (first 32 bytes):
    98 f2 49 1d 81 88 ff ff 00 00 00 00 00 00 00 00  ..I.............
    00 00 00 00 00 00 00 00 02 00 00 00 78 ef 9f 5b  ............x..[
  backtrace:
    [<ffffffff8163331d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163331d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163331d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163331d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e175>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
    [<ffffffff82ebfeb1>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff82ebfeb1>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82ebfeb1>] keypair_create drivers/net/wireguard/noise.c:100 [inline]
    [<ffffffff82ebfeb1>] wg_noise_handshake_begin_session+0x81/0x310 drivers/net/wireguard/noise.c:827
    [<ffffffff82ec34b9>] wg_packet_send_handshake_response+0xb9/0x120 drivers/net/wireguard/send.c:96
    [<ffffffff82ec4fcd>] wg_receive_handshake_packet drivers/net/wireguard/receive.c:154 [inline]
    [<ffffffff82ec4fcd>] wg_packet_handshake_receive_worker+0xed/0x560 drivers/net/wireguard/receive.c:213
    [<ffffffff812cb50d>] process_one_work+0x23d/0x530 kernel/workqueue.c:2630
    [<ffffffff812cc137>] process_scheduled_works kernel/workqueue.c:2703 [inline]
    [<ffffffff812cc137>] worker_thread+0x327/0x590 kernel/workqueue.c:2784
    [<ffffffff812d8afb>] kthread+0x12b/0x170 kernel/kthread.c:388
    [<ffffffff8114b9a5>] ret_from_fork+0x45/0x50 arch/x86/kernel/process.c:147
    [<ffffffff81002c01>] ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

BUG: memory leak
unreferenced object 0xffff88811ef74000 (size 2048):
  comm "kworker/0:0", pid 5099, jiffies 4295045665 (age 139.470s)
  hex dump (first 32 bytes):
    00 80 9d 1d 81 88 ff ff 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 02 00 00 00 db f7 d8 e9  ................
  backtrace:
    [<ffffffff8163331d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163331d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163331d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163331d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e175>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
    [<ffffffff82ebfeb1>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff82ebfeb1>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82ebfeb1>] keypair_create drivers/net/wireguard/noise.c:100 [inline]
    [<ffffffff82ebfeb1>] wg_noise_handshake_begin_session+0x81/0x310 drivers/net/wireguard/noise.c:827
    [<ffffffff82ec528d>] wg_receive_handshake_packet drivers/net/wireguard/receive.c:176 [inline]
    [<ffffffff82ec528d>] wg_packet_handshake_receive_worker+0x3ad/0x560 drivers/net/wireguard/receive.c:213
    [<ffffffff812cb50d>] process_one_work+0x23d/0x530 kernel/workqueue.c:2630
    [<ffffffff812cc137>] process_scheduled_works kernel/workqueue.c:2703 [inline]
    [<ffffffff812cc137>] worker_thread+0x327/0x590 kernel/workqueue.c:2784
    [<ffffffff812d8afb>] kthread+0x12b/0x170 kernel/kthread.c:388
    [<ffffffff8114b9a5>] ret_from_fork+0x45/0x50 arch/x86/kernel/process.c:147
    [<ffffffff81002c01>] ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

BUG: memory leak
unreferenced object 0xffff88810b6c6180 (size 192):
  comm "syslogd", pid 4470, jiffies 4295052843 (age 67.690s)
  hex dump (first 32 bytes):
    08 81 00 00 08 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 c0 fc 61 00 81 88 ff ff  ..........a.....
  backtrace:
    [<ffffffff816311fe>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff816311fe>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff816311fe>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff816311fe>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff816311fe>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff816311fe>] kmem_cache_alloc_lru+0x2ee/0x520 mm/slub.c:3509
    [<ffffffff816c5281>] __d_alloc+0x31/0x2f0 fs/dcache.c:1768
    [<ffffffff816c5569>] d_alloc+0x29/0xd0 fs/dcache.c:1848
    [<ffffffff816ca4f2>] d_alloc_parallel+0x62/0x610 fs/dcache.c:2637
    [<ffffffff816b58cd>] lookup_open fs/namei.c:3402 [inline]
    [<ffffffff816b58cd>] open_last_lookups fs/namei.c:3546 [inline]
    [<ffffffff816b58cd>] path_openat+0xd0d/0x1d60 fs/namei.c:3776
    [<ffffffff816b7541>] do_filp_open+0xd1/0x1c0 fs/namei.c:3809
    [<ffffffff81690324>] do_sys_openat2+0xf4/0x150 fs/open.c:1440
    [<ffffffff81690d0f>] do_sys_open fs/open.c:1455 [inline]
    [<ffffffff81690d0f>] __do_sys_openat fs/open.c:1471 [inline]
    [<ffffffff81690d0f>] __se_sys_openat fs/open.c:1466 [inline]
    [<ffffffff81690d0f>] __x64_sys_openat+0xaf/0x100 fs/open.c:1466
    [<ffffffff84b65d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b65d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88811f108fa0 (size 792):
  comm "syslogd", pid 4470, jiffies 4295052843 (age 67.690s)
  hex dump (first 32 bytes):
    00 00 00 00 01 00 00 00 00 00 20 00 00 00 00 00  .......... .....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff816311fe>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff816311fe>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff816311fe>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff816311fe>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff816311fe>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff816311fe>] kmem_cache_alloc_lru+0x2ee/0x520 mm/slub.c:3509
    [<ffffffff815625d5>] alloc_inode_sb include/linux/fs.h:2937 [inline]
    [<ffffffff815625d5>] shmem_alloc_inode+0x25/0x50 mm/shmem.c:4408
    [<ffffffff816cf183>] alloc_inode+0x23/0x100 fs/inode.c:259
    [<ffffffff816cf27e>] new_inode_pseudo fs/inode.c:1004 [inline]
    [<ffffffff816cf27e>] new_inode+0x1e/0xe0 fs/inode.c:1030
    [<ffffffff81563bab>] __shmem_get_inode mm/shmem.c:2462 [inline]
    [<ffffffff81563bab>] shmem_get_inode+0xcb/0x5a0 mm/shmem.c:2533
    [<ffffffff815641e0>] shmem_mknod+0x40/0x170 mm/shmem.c:3227
    [<ffffffff816b639f>] lookup_open fs/namei.c:3477 [inline]
    [<ffffffff816b639f>] open_last_lookups fs/namei.c:3546 [inline]
    [<ffffffff816b639f>] path_openat+0x17df/0x1d60 fs/namei.c:3776
    [<ffffffff816b7541>] do_filp_open+0xd1/0x1c0 fs/namei.c:3809
    [<ffffffff81690324>] do_sys_openat2+0xf4/0x150 fs/open.c:1440
    [<ffffffff81690d0f>] do_sys_open fs/open.c:1455 [inline]
    [<ffffffff81690d0f>] __do_sys_openat fs/open.c:1471 [inline]
    [<ffffffff81690d0f>] __se_sys_openat fs/open.c:1466 [inline]
    [<ffffffff81690d0f>] __x64_sys_openat+0xaf/0x100 fs/open.c:1466
    [<ffffffff84b65d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b65d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

[ 1223.66147

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/06 23:19 upstream d2f51b3516da 78fae24e .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in wg_noise_handshake_begin_session
2023/09/12 16:33 upstream 0bb80ecc33a8 59da8366 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in wg_noise_handshake_begin_session
* Struck through repros no longer work on HEAD.