syzbot


memory leak in copy_process

Status: fixed on 2021/03/10 01:48
Subsystems: kernel
[Documentation on labels]
Fix commit: 450677dcb0cc mm/madvise: fix memory leak from process_madvise
First crash: 1425d, last: 1327d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in copy_process (2) kernel C 2 1306d 1305d 20/28 fixed on 2021/11/10 00:50
upstream memory leak in copy_process (5) kernel C 1 586d 583d 22/28 fixed on 2023/06/08 14:41
upstream memory leak in copy_process (4) kernel C 1 683d 683d 0/28 closed as invalid on 2023/02/17 17:35
upstream memory leak in copy_process (3) kernel C 2 793d 899d 0/28 closed as invalid on 2022/11/09 20:31

Sample crash report:
Debian GNU/Linux 9 syzkaller ttyS0
Warning: Permanently added '10.128.0.86' (ECDSA) to the list of known hosts.
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810164ae00 (size 120):
  comm "kworker/u4:3", pid 301, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 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:
    [<0000000090e540e5>] alloc_pid+0x66/0x560 kernel/pid.c:180
    [<00000000cc361de4>] copy_process+0x143b/0x25c0 kernel/fork.c:2113
    [<000000001a5ec605>] kernel_clone+0xf3/0x670 kernel/fork.c:2462
    [<00000000e742baab>] kernel_thread+0x61/0x80 kernel/fork.c:2514
    [<00000000ce704702>] call_usermodehelper_exec_work kernel/umh.c:172 [inline]
    [<00000000ce704702>] call_usermodehelper_exec_work+0xc4/0x120 kernel/umh.c:158
    [<000000003d2ad9a5>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<00000000d04fea20>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2421
    [<00000000b59bb63d>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888110247200 (size 232):
  comm "kworker/u4:3", pid 8416, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    e0 47 04 01 81 88 ff ff c0 d9 b2 0f 81 88 ff ff  .G..............
  backtrace:
    [<0000000078d2e4fa>] kmem_cache_zalloc include/linux/slab.h:672 [inline]
    [<0000000078d2e4fa>] __alloc_file+0x1f/0xf0 fs/file_table.c:101
    [<00000000b2fb9873>] alloc_empty_file+0x69/0x120 fs/file_table.c:150
    [<00000000731d145f>] alloc_file+0x33/0x1b0 fs/file_table.c:192
    [<00000000e6dbe01a>] alloc_file_pseudo+0xb2/0x140 fs/file_table.c:232
    [<000000004ae6c20e>] create_pipe_files+0x138/0x2e0 fs/pipe.c:911
    [<00000000a7c228b0>] umd_setup+0x33/0x220 kernel/usermode_driver.c:104
    [<00000000c0d39b81>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff88810fb93c20 (size 608):
  comm "kworker/u4:3", pid 8416, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    80 11 04 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
  backtrace:
    [<000000008f764664>] alloc_inode+0xbe/0x100 fs/inode.c:235
    [<0000000062a81fab>] new_inode_pseudo+0x13/0x70 fs/inode.c:927
    [<00000000294e93ac>] get_pipe_inode fs/pipe.c:855 [inline]
    [<00000000294e93ac>] create_pipe_files+0x2b/0x2e0 fs/pipe.c:895
    [<00000000493ecbe3>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<00000000c0d39b81>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff88810f1e56c0 (size 192):
  comm "kworker/u4:3", pid 8416, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    d0 56 1e 0f 81 88 ff ff d0 56 1e 0f 81 88 ff ff  .V.......V......
  backtrace:
    [<000000009392a8cd>] kmalloc include/linux/slab.h:552 [inline]
    [<000000009392a8cd>] kzalloc include/linux/slab.h:682 [inline]
    [<000000009392a8cd>] alloc_pipe_info+0x8f/0x320 fs/pipe.c:774
    [<000000005047268b>] get_pipe_inode fs/pipe.c:863 [inline]
    [<000000005047268b>] create_pipe_files+0x4d/0x2e0 fs/pipe.c:895
    [<00000000493ecbe3>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<00000000c0d39b81>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff88810c8a0800 (size 1024):
  comm "kworker/u4:3", pid 8416, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    c0 ae 04 04 00 ea ff ff 14 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00  ................
  backtrace:
    [<000000006124650f>] kcalloc include/linux/slab.h:621 [inline]
    [<000000006124650f>] alloc_pipe_info+0x154/0x320 fs/pipe.c:791
    [<000000005047268b>] get_pipe_inode fs/pipe.c:863 [inline]
    [<000000005047268b>] create_pipe_files+0x4d/0x2e0 fs/pipe.c:895
    [<00000000493ecbe3>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<00000000c0d39b81>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff88810fb2dcc0 (size 192):
  comm "kworker/u4:3", pid 8416, jiffies 4294943007 (age 12.670s)
  hex dump (first 32 bytes):
    00 00 50 40 02 00 00 00 00 00 00 00 00 00 00 00  ..P@............
    00 00 00 00 00 00 00 00 c0 dc b2 0f 81 88 ff ff  ................
  backtrace:
    [<00000000fc3c678e>] __d_alloc+0x2a/0x270 fs/dcache.c:1716
    [<00000000915b05b6>] d_alloc_pseudo+0x19/0x40 fs/dcache.c:1845
    [<000000008af849d5>] alloc_file_pseudo+0x5f/0x140 fs/file_table.c:225
    [<000000004ae6c20e>] create_pipe_files+0x138/0x2e0 fs/pipe.c:911
    [<00000000493ecbe3>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<00000000c0d39b81>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<00000000cb7c806f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296


Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/20 14:51 upstream f40ddce88593 3e5ed8b4 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/14 22:48 upstream 358feceebbf6 98682e5e .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/13 06:09 upstream dcc0b49040c7 98682e5e .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/12 07:33 upstream 291009f656e8 a5f86b15 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/11 12:01 upstream 291009f656e8 a52ee10a .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/11 04:30 upstream 291009f656e8 a52ee10a .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/08 16:12 upstream 92bf22614b21 2ce644fc .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/08 15:32 upstream 92bf22614b21 2ce644fc .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/08 15:30 upstream 92bf22614b21 2ce644fc .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/08 13:21 upstream 92bf22614b21 2ce644fc .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/08 13:15 upstream 92bf22614b21 2ce644fc .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/07 07:01 upstream 964d069f93c4 0655e081 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/07 04:23 upstream 964d069f93c4 0655e081 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/07 03:45 upstream 964d069f93c4 0655e081 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/06 10:30 upstream 1e0d27fce010 23a562df .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/06 06:08 upstream 1e0d27fce010 23a562df .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/06 00:30 upstream dd86e7fa07a3 23a562df .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/05 01:48 upstream 5c279c4cf206 23a562df .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/04 17:14 upstream 61556703b610 42b90a7c .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2021/02/04 01:47 upstream 3afe9076a7c1 624dad51 .config console log report syz C ci-upstream-gce-leak memory leak in copy_process
2020/11/22 05:51 upstream a349e4c65960 0d27f508 .config console log report syz C ci-upstream-gce-leak
2020/11/18 17:20 upstream 0fa8ee0d9ab9 09323409 .config console log report syz C ci-upstream-gce-leak
2020/11/15 12:32 upstream e28c0d7c92c8 1bf9a662 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.