syzbot


memory leak in copy_process (2)

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+44908bb56d2bfe56b28e@syzkaller.appspotmail.com
Fix commit: f60a85cad677 bpf: Fix umd memory leak in copy_process()
First crash: 566d, last: 563d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in copy_process C 23 584d 681d 21/24 fixed on 2021/03/10 01:48

Sample crash report:
Warning: Permanently added '10.128.0.41' (ECDSA) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888101b41d00 (size 120):
  comm "kworker/u4:0", pid 8, jiffies 4294944270 (age 12.780s)
  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:
    [<ffffffff8125dc56>] alloc_pid+0x66/0x560 kernel/pid.c:180
    [<ffffffff81226405>] copy_process+0x1465/0x25e0 kernel/fork.c:2115
    [<ffffffff81227943>] kernel_clone+0xf3/0x670 kernel/fork.c:2493
    [<ffffffff812281a1>] kernel_thread+0x61/0x80 kernel/fork.c:2545
    [<ffffffff81253464>] call_usermodehelper_exec_work kernel/umh.c:172 [inline]
    [<ffffffff81253464>] call_usermodehelper_exec_work+0xc4/0x120 kernel/umh.c:158
    [<ffffffff812591c9>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259ab9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2421
    [<ffffffff812611c8>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888110ef5c00 (size 232):
  comm "kworker/u4:0", pid 8414, jiffies 4294944270 (age 12.780s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    e0 b7 04 01 81 88 ff ff c0 56 ba 0f 81 88 ff ff  .........V......
  backtrace:
    [<ffffffff8154a0cf>] kmem_cache_zalloc include/linux/slab.h:674 [inline]
    [<ffffffff8154a0cf>] __alloc_file+0x1f/0xf0 fs/file_table.c:101
    [<ffffffff8154a809>] alloc_empty_file+0x69/0x120 fs/file_table.c:150
    [<ffffffff8154a8f3>] alloc_file+0x33/0x1b0 fs/file_table.c:192
    [<ffffffff8154ab22>] alloc_file_pseudo+0xb2/0x140 fs/file_table.c:232
    [<ffffffff81559218>] create_pipe_files+0x138/0x2e0 fs/pipe.c:911
    [<ffffffff8126c793>] umd_setup+0x33/0x220 kernel/usermode_driver.c:104
    [<ffffffff81253574>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888110cafc90 (size 24):
  comm "kworker/u4:0", pid 8414, jiffies 4294944270 (age 12.780s)
  hex dump (first 24 bytes):
    00 00 00 00 00 00 00 00 b0 0e 94 00 81 88 ff ff  ................
    00 00 00 00 00 00 00 00                          ........
  backtrace:
    [<ffffffff820e15ca>] kmem_cache_zalloc include/linux/slab.h:674 [inline]
    [<ffffffff820e15ca>] lsm_file_alloc security/security.c:569 [inline]
    [<ffffffff820e15ca>] security_file_alloc+0x2a/0xb0 security/security.c:1470
    [<ffffffff8154a10d>] __alloc_file+0x5d/0xf0 fs/file_table.c:106
    [<ffffffff8154a809>] alloc_empty_file+0x69/0x120 fs/file_table.c:150
    [<ffffffff8154a8f3>] alloc_file+0x33/0x1b0 fs/file_table.c:192
    [<ffffffff8154ab22>] alloc_file_pseudo+0xb2/0x140 fs/file_table.c:232
    [<ffffffff81559218>] create_pipe_files+0x138/0x2e0 fs/pipe.c:911
    [<ffffffff8126c793>] umd_setup+0x33/0x220 kernel/usermode_driver.c:104
    [<ffffffff81253574>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888110ef5e00 (size 232):
  comm "kworker/u4:0", pid 8414, jiffies 4294944270 (age 12.780s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    e0 b7 04 01 81 88 ff ff 00 59 ba 0f 81 88 ff ff  .........Y......
  backtrace:
    [<ffffffff8154a0cf>] kmem_cache_zalloc include/linux/slab.h:674 [inline]
    [<ffffffff8154a0cf>] __alloc_file+0x1f/0xf0 fs/file_table.c:101
    [<ffffffff8154a809>] alloc_empty_file+0x69/0x120 fs/file_table.c:150
    [<ffffffff8154a8f3>] alloc_file+0x33/0x1b0 fs/file_table.c:192
    [<ffffffff8154ac22>] alloc_file_clone+0x22/0x70 fs/file_table.c:244
    [<ffffffff81559262>] create_pipe_files+0x182/0x2e0 fs/pipe.c:922
    [<ffffffff8126c80d>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<ffffffff81253574>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888110cafc18 (size 24):
  comm "kworker/u4:0", pid 8414, jiffies 4294944270 (age 12.780s)
  hex dump (first 24 bytes):
    00 00 00 00 00 00 00 00 b0 0e 94 00 81 88 ff ff  ................
    00 00 00 00 00 00 00 00                          ........
  backtrace:
    [<ffffffff820e15ca>] kmem_cache_zalloc include/linux/slab.h:674 [inline]
    [<ffffffff820e15ca>] lsm_file_alloc security/security.c:569 [inline]
    [<ffffffff820e15ca>] security_file_alloc+0x2a/0xb0 security/security.c:1470
    [<ffffffff8154a10d>] __alloc_file+0x5d/0xf0 fs/file_table.c:106
    [<ffffffff8154a809>] alloc_empty_file+0x69/0x120 fs/file_table.c:150
    [<ffffffff8154a8f3>] alloc_file+0x33/0x1b0 fs/file_table.c:192
    [<ffffffff8154ac22>] alloc_file_clone+0x22/0x70 fs/file_table.c:244
    [<ffffffff81559262>] create_pipe_files+0x182/0x2e0 fs/pipe.c:922
    [<ffffffff8126c80d>] umd_setup+0xad/0x220 kernel/usermode_driver.c:115
    [<ffffffff81253574>] call_usermodehelper_exec_async+0xb4/0x1b0 kernel/umh.c:101
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294


Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2021/03/14 09:53 upstream 88fe49249c99 4a003785 .config log report syz C memory leak in copy_process
ci-upstream-gce-leak 2021/03/11 00:42 upstream 05a59d79793d 764067f3 .config log report syz C memory leak in copy_process
* Struck through repros no longer work on HEAD.