syzbot


memory leak in can_create

Status: upstream: reported C repro on 2021/07/23 15:55
Reported-by: syzbot+ba3c733fb22a7be2ce04@syzkaller.appspotmail.com
First crash: 568d, last: 268d
Last patch testing requests:
Created Duration User Patch Repo Result
2022/11/10 19:30 6m retest repro upstream error
2022/11/10 18:30 17m retest repro upstream OK log
2021/08/24 09:47 8m asha.16@itfac.mrt.ac.lk https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master report log
2021/07/24 14:16 8m phind.uet@gmail.com upstream report log

Sample crash report:
executing program
BUG: memory leak
unreferenced object 0xffff8881140ffc00 (size 1024):
  comm "syz-executor060", pid 8644, jiffies 4294942938 (age 13.010s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    1d 00 07 41 00 00 00 00 00 00 00 00 00 00 00 00  ...A............
  backtrace:
    [<ffffffff836d5d92>] kmalloc include/linux/slab.h:596 [inline]
    [<ffffffff836d5d92>] sk_prot_alloc+0xd2/0x1b0 net/core/sock.c:1808
    [<ffffffff836da5a0>] sk_alloc+0x30/0x3f0 net/core/sock.c:1861
    [<ffffffff83c8fd18>] can_create+0x108/0x300 net/can/af_can.c:158
    [<ffffffff836ce96b>] __sock_create+0x1ab/0x2b0 net/socket.c:1450
    [<ffffffff836d198f>] sock_create net/socket.c:1501 [inline]
    [<ffffffff836d198f>] __sys_socket+0x6f/0x140 net/socket.c:1543
    [<ffffffff836d1a7a>] __do_sys_socket net/socket.c:1552 [inline]
    [<ffffffff836d1a7a>] __se_sys_socket net/socket.c:1550 [inline]
    [<ffffffff836d1a7a>] __x64_sys_socket+0x1a/0x20 net/socket.c:1550
    [<ffffffff843b0915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff843b0915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff8881170d2340 (size 32):
  comm "syz-executor060", pid 8644, jiffies 4294942938 (age 13.010s)
  hex dump (first 32 bytes):
    b0 02 05 40 81 88 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:
    [<ffffffff82167ee3>] kmalloc include/linux/slab.h:591 [inline]
    [<ffffffff82167ee3>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82167ee3>] apparmor_sk_alloc_security+0x53/0xd0 security/apparmor/lsm.c:785
    [<ffffffff8212d441>] security_sk_alloc+0x31/0x70 security/security.c:2261
    [<ffffffff836d5dad>] sk_prot_alloc+0xed/0x1b0 net/core/sock.c:1811
    [<ffffffff836da5a0>] sk_alloc+0x30/0x3f0 net/core/sock.c:1861
    [<ffffffff83c8fd18>] can_create+0x108/0x300 net/can/af_can.c:158
    [<ffffffff836ce96b>] __sock_create+0x1ab/0x2b0 net/socket.c:1450
    [<ffffffff836d198f>] sock_create net/socket.c:1501 [inline]
    [<ffffffff836d198f>] __sys_socket+0x6f/0x140 net/socket.c:1543
    [<ffffffff836d1a7a>] __do_sys_socket net/socket.c:1552 [inline]
    [<ffffffff836d1a7a>] __se_sys_socket net/socket.c:1550 [inline]
    [<ffffffff836d1a7a>] __x64_sys_socket+0x1a/0x20 net/socket.c:1550
    [<ffffffff843b0915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff843b0915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88811344a100 (size 232):
  comm "syz-executor060", pid 8644, jiffies 4294942938 (age 13.010s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 2c 10 81 88 ff ff 00 fc 0f 14 81 88 ff ff  ..,.............
  backtrace:
    [<ffffffff836e0ebf>] __alloc_skb+0x20f/0x280 net/core/skbuff.c:414
    [<ffffffff836eb6fa>] alloc_skb include/linux/skbuff.h:1112 [inline]
    [<ffffffff836eb6fa>] alloc_skb_with_frags+0x6a/0x2b0 net/core/skbuff.c:6005
    [<ffffffff836d8fe3>] sock_alloc_send_pskb+0x353/0x3c0 net/core/sock.c:2461
    [<ffffffff83c9ee2f>] j1939_sk_alloc_skb net/can/j1939/socket.c:861 [inline]
    [<ffffffff83c9ee2f>] j1939_sk_send_loop net/can/j1939/socket.c:1043 [inline]
    [<ffffffff83c9ee2f>] j1939_sk_sendmsg+0x2cf/0x800 net/can/j1939/socket.c:1178
    [<ffffffff836cfb86>] sock_sendmsg_nosec net/socket.c:703 [inline]
    [<ffffffff836cfb86>] sock_sendmsg+0x56/0x80 net/socket.c:723
    [<ffffffff836d00ec>] ____sys_sendmsg+0x36c/0x390 net/socket.c:2392
    [<ffffffff836d413b>] ___sys_sendmsg+0x8b/0xd0 net/socket.c:2446
    [<ffffffff836d4238>] __sys_sendmsg+0x88/0x100 net/socket.c:2475
    [<ffffffff843b0915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff843b0915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88811344aa00 (size 232):
  comm "syz-executor060", pid 8644, jiffies 4294942938 (age 13.010s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 2c 10 81 88 ff ff 00 fc 0f 14 81 88 ff ff  ..,.............
  backtrace:
    [<ffffffff836e0ebf>] __alloc_skb+0x20f/0x280 net/core/skbuff.c:414
    [<ffffffff836eb6fa>] alloc_skb include/linux/skbuff.h:1112 [inline]
    [<ffffffff836eb6fa>] alloc_skb_with_frags+0x6a/0x2b0 net/core/skbuff.c:6005
    [<ffffffff836d8fe3>] sock_alloc_send_pskb+0x353/0x3c0 net/core/sock.c:2461
    [<ffffffff83c9ee2f>] j1939_sk_alloc_skb net/can/j1939/socket.c:861 [inline]
    [<ffffffff83c9ee2f>] j1939_sk_send_loop net/can/j1939/socket.c:1043 [inline]
    [<ffffffff83c9ee2f>] j1939_sk_sendmsg+0x2cf/0x800 net/can/j1939/socket.c:1178
    [<ffffffff836cfb86>] sock_sendmsg_nosec net/socket.c:703 [inline]
    [<ffffffff836cfb86>] sock_sendmsg+0x56/0x80 net/socket.c:723
    [<ffffffff836d00ec>] ____sys_sendmsg+0x36c/0x390 net/socket.c:2392
    [<ffffffff836d413b>] ___sys_sendmsg+0x8b/0xd0 net/socket.c:2446
    [<ffffffff836d4238>] __sys_sendmsg+0x88/0x100 net/socket.c:2475
    [<ffffffff843b0915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff843b0915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-gce-leak 2021/07/19 15:48 upstream 2734d6c1b1a0 e6a17580 .config console log report syz C memory leak in can_create
ci-upstream-gce-leak 2022/05/15 19:45 upstream bc403203d65a 744a39e2 .config console log report syz C memory leak in can_create
* Struck through repros no longer work on HEAD.