Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [syzbot] memory leak in can_create
@ 2021-07-23 15:55 syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2021-07-23 15:55 UTC (permalink / raw)
  To: davem, kuba, linux-can, linux-kernel, mkl, netdev, socketcan,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    2734d6c1b1a0 Linux 5.14-rc2
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=121ee3f2300000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7384ed231a0fd986
dashboard link: https://syzkaller.appspot.com/bug?extid=ba3c733fb22a7be2ce04
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1200c812300000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1608525a300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ba3c733fb22a7be2ce04@syzkaller.appspotmail.com

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



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-23 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 15:55 [syzbot] memory leak in can_create syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).