syzbot


memory leak in watch_queue_set_size

Status: fixed on 2023/02/24 13:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+25ea042ae28f3888727a@syzkaller.appspotmail.com
Fix commit: b490207017ba watch_queue: Free the page array when watch_queue is dismantled
First crash: 716d, last: 716d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.10 000/599] 5.10.110-rc1 review 628 (629) 2022/05/08 12:31
[PATCH 5.16 0000/1017] 5.16.19-rc1 review 1034 (1035) 2022/04/07 08:34
[PATCH 5.15 000/913] 5.15.33-rc1 review 932 (933) 2022/04/06 15:36
[PATCH 5.17 0000/1126] 5.17.2-rc1 review 1143 (1144) 2022/04/06 14:06
[PATCH] watch_queue: Free the page array when watch_queue is dismantled 1 (1) 2022/03/28 17:07
[PATCH] watch_queue: Free the page array when watch_queue is dismantled 4 (4) 2022/03/28 16:49
[PATCH] watch_queue: free the notes array 1 (1) 2022/03/27 15:49
[syzbot] memory leak in watch_queue_set_size 0 (1) 2022/03/26 18:43
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/03/27 13:12 9m mail@anirudhrb.com patch upstream OK

Sample crash report:
Warning: Permanently added '10.128.10.51' (ECDSA) to the list of known hosts.
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810d9bc140 (size 32):
  comm "syz-executor335", pid 3603, jiffies 4294946994 (age 12.840s)
  hex dump (first 32 bytes):
    40 a7 40 04 00 ea ff ff 00 00 00 00 00 00 00 00  @.@.............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81459bff>] kmalloc_array include/linux/slab.h:621 [inline]
    [<ffffffff81459bff>] kcalloc include/linux/slab.h:652 [inline]
    [<ffffffff81459bff>] watch_queue_set_size+0x12f/0x2e0 kernel/watch_queue.c:251
    [<ffffffff8159fcf2>] pipe_ioctl+0x82/0x140 fs/pipe.c:632
    [<ffffffff815b601c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff815b601c>] __do_sys_ioctl fs/ioctl.c:874 [inline]
    [<ffffffff815b601c>] __se_sys_ioctl fs/ioctl.c:860 [inline]
    [<ffffffff815b601c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860
    [<ffffffff84493a05>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84493a05>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810d9b2440 (size 32):
  comm "syz-executor335", pid 3606, jiffies 4294947528 (age 7.500s)
  hex dump (first 32 bytes):
    40 4d 36 04 00 ea ff ff 00 00 00 00 00 00 00 00  @M6.............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81459bff>] kmalloc_array include/linux/slab.h:621 [inline]
    [<ffffffff81459bff>] kcalloc include/linux/slab.h:652 [inline]
    [<ffffffff81459bff>] watch_queue_set_size+0x12f/0x2e0 kernel/watch_queue.c:251
    [<ffffffff8159fcf2>] pipe_ioctl+0x82/0x140 fs/pipe.c:632
    [<ffffffff815b601c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff815b601c>] __do_sys_ioctl fs/ioctl.c:874 [inline]
    [<ffffffff815b601c>] __se_sys_ioctl fs/ioctl.c:860 [inline]
    [<ffffffff815b601c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860
    [<ffffffff84493a05>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84493a05>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/19 10:16 upstream 34e047aa16c0 e2d91b1d .config console log report syz C ci-upstream-gce-leak memory leak in watch_queue_set_size
* Struck through repros no longer work on HEAD.