syzbot


memory leak in smc_sysctl_net_init

Status: fixed on 2023/02/24 13:50
Subsystems: net s390
[Documentation on labels]
Fix commit: 5ae6acf1d00b net/smc: fix a memory leak in smc_sysctl_net_exit()
First crash: 930d, last: 925d

Sample crash report:
Warning: Permanently added '10.128.0.171' (ECDSA) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888109f4ca80 (size 128):
  comm "syz-executor482", pid 3599, jiffies 4294946023 (age 13.850s)
  hex dump (first 32 bytes):
    9f db 7a 85 ff ff ff ff c8 d0 9e 06 81 88 ff ff  ..z.............
    04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814a70f3>] kmemdup+0x23/0x50 mm/util.c:128
    [<ffffffff841b2364>] kmemdup include/linux/fortify-string.h:440 [inline]
    [<ffffffff841b2364>] smc_sysctl_net_init+0x34/0xe0 net/smc/smc_sysctl.c:39
    [<ffffffff84184723>] smc_net_init+0x13/0x40 net/smc/af_smc.c:3184
    [<ffffffff837e9d5e>] ops_init+0x4e/0x190 net/core/net_namespace.c:134
    [<ffffffff837ea081>] setup_net+0x1e1/0x3f0 net/core/net_namespace.c:325
    [<ffffffff837ea8b0>] copy_net_ns+0x1a0/0x3e0 net/core/net_namespace.c:471
    [<ffffffff81277b29>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110
    [<ffffffff8127848b>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226
    [<ffffffff8123a71e>] ksys_unshare+0x2fe/0x600 kernel/fork.c:3132
    [<ffffffff8123aa32>] __do_sys_unshare kernel/fork.c:3203 [inline]
    [<ffffffff8123aa32>] __se_sys_unshare kernel/fork.c:3201 [inline]
    [<ffffffff8123aa32>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3201
    [<ffffffff845105d5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845105d5>] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888108ecaa00 (size 128):
  comm "syz-executor482", pid 3602, jiffies 4294946617 (age 7.910s)
  hex dump (first 32 bytes):
    9f db 7a 85 ff ff ff ff 08 b1 f9 09 81 88 ff ff  ..z.............
    04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814a70f3>] kmemdup+0x23/0x50 mm/util.c:128
    [<ffffffff841b2364>] kmemdup include/linux/fortify-string.h:440 [inline]
    [<ffffffff841b2364>] smc_sysctl_net_init+0x34/0xe0 net/smc/smc_sysctl.c:39
    [<ffffffff84184723>] smc_net_init+0x13/0x40 net/smc/af_smc.c:3184
    [<ffffffff837e9d5e>] ops_init+0x4e/0x190 net/core/net_namespace.c:134
    [<ffffffff837ea081>] setup_net+0x1e1/0x3f0 net/core/net_namespace.c:325
    [<ffffffff837ea8b0>] copy_net_ns+0x1a0/0x3e0 net/core/net_namespace.c:471
    [<ffffffff81277b29>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110
    [<ffffffff8127848b>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226
    [<ffffffff8123a71e>] ksys_unshare+0x2fe/0x600 kernel/fork.c:3132
    [<ffffffff8123aa32>] __do_sys_unshare kernel/fork.c:3203 [inline]
    [<ffffffff8123aa32>] __se_sys_unshare kernel/fork.c:3201 [inline]
    [<ffffffff8123aa32>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3201
    [<ffffffff845105d5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845105d5>] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/29 09:36 upstream cffb2b72d3ed 6bdac766 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/28 05:51 upstream f82da161ea75 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/28 04:47 upstream f82da161ea75 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/27 21:30 upstream f022814633e1 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/27 19:48 upstream f022814633e1 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/25 20:20 upstream 34af78c4e616 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/25 05:17 upstream 52deda9551a0 89bc8608 .config console log report syz C ci-upstream-gce-leak memory leak in smc_sysctl_net_init
2022/03/29 14:49 upstream cffb2b72d3ed 6bdac766 .config console log report syz ci-upstream-gce-leak memory leak in smc_sysctl_net_init
* Struck through repros no longer work on HEAD.