[syzbot] [can?] memory leak in j1939_netdev_start

20 views
Skip to first unread message

syzbot

unread,
Nov 24, 2023, 9:45:23 PM11/24/23
to da...@davemloft.net, edum...@google.com, ker...@pengutronix.de, ku...@kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, m...@pengutronix.de, net...@vger.kernel.org, o.re...@pengutronix.de, pab...@redhat.com, ro...@protonic.nl, sock...@hartkopp.net, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 98b1cc82c4af Linux 6.7-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1286e3d4e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f1b9d95ada516af
dashboard link: https://syzkaller.appspot.com/bug?extid=1d37bef05da87b99c5a6
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c8f8cce80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6b6d520f592c/disk-98b1cc82.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c2cb6183fd56/vmlinux-98b1cc82.xz
kernel image: https://storage.googleapis.com/syzbot-assets/de520cfc8b93/bzImage-98b1cc82.xz

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

BUG: memory leak
unreferenced object 0xffff88811f324000 (size 8192):
comm "syz-executor.7", pid 5245, jiffies 4294947603 (age 10.860s)
hex dump (first 32 bytes):
00 40 32 1f 81 88 ff ff 00 40 32 1f 81 88 ff ff .@2......@2.....
00 00 00 00 00 00 00 00 00 80 0f 1b 81 88 ff ff ................
backtrace:
[<ffffffff816339bd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff816339bd>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff816339bd>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff816339bd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
[<ffffffff8157e845>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff8453e829>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff8453e829>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff8453e829>] j1939_priv_create net/can/j1939/main.c:135 [inline]
[<ffffffff8453e829>] j1939_netdev_start+0x159/0x6f0 net/can/j1939/main.c:272
[<ffffffff8454046e>] j1939_sk_bind+0x21e/0x550 net/can/j1939/socket.c:485
[<ffffffff83ec4dac>] __sys_bind+0x11c/0x130 net/socket.c:1845
[<ffffffff83ec4ddc>] __do_sys_bind net/socket.c:1856 [inline]
[<ffffffff83ec4ddc>] __se_sys_bind net/socket.c:1854 [inline]
[<ffffffff83ec4ddc>] __x64_sys_bind+0x1c/0x20 net/socket.c:1854
[<ffffffff84b6bd8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
[<ffffffff84b6bd8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88811f0bf300 (size 240):
comm "softirq", pid 0, jiffies 4294947604 (age 10.850s)
hex dump (first 32 bytes):
68 74 bb 1d 81 88 ff ff 68 74 bb 1d 81 88 ff ff ht......ht......
00 80 0f 1b 81 88 ff ff 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81631427>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff81631427>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff81631427>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff81631427>] kmem_cache_alloc_node+0x2c7/0x450 mm/slub.c:3523
[<ffffffff83ed869f>] __alloc_skb+0x1ef/0x230 net/core/skbuff.c:641
[<ffffffff845473ef>] alloc_skb include/linux/skbuff.h:1286 [inline]
[<ffffffff845473ef>] j1939_session_fresh_new net/can/j1939/transport.c:1535 [inline]
[<ffffffff845473ef>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff845473ef>] j1939_xtp_rx_rts+0x49f/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84547ea5>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84547ea5>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8453e3f9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8452eea4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8452eea4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8452f560>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8452f6a0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f10bf6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5529
[<ffffffff83f10c6d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5643
[<ffffffff83f10fcc>] process_backlog+0xbc/0x190 net/core/dev.c:5971
[<ffffffff83f1215e>] __napi_poll+0x3e/0x310 net/core/dev.c:6533
[<ffffffff83f12b78>] napi_poll net/core/dev.c:6602 [inline]
[<ffffffff83f12b78>] net_rx_action+0x3d8/0x510 net/core/dev.c:6735
[<ffffffff84b8974d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff88811f340000 (size 131072):
comm "softirq", pid 0, jiffies 4294947604 (age 10.850s)
hex dump (first 32 bytes):
0e 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:
[<ffffffff8157e703>] __kmalloc_large_node+0xe3/0x170 mm/slab_common.c:1157
[<ffffffff8157ecbb>] __do_kmalloc_node mm/slab_common.c:995 [inline]
[<ffffffff8157ecbb>] __kmalloc_node_track_caller+0xbb/0x150 mm/slab_common.c:1027
[<ffffffff83ed49a6>] kmalloc_reserve+0x96/0x170 net/core/skbuff.c:582
[<ffffffff83ed8585>] __alloc_skb+0xd5/0x230 net/core/skbuff.c:651
[<ffffffff845473ef>] alloc_skb include/linux/skbuff.h:1286 [inline]
[<ffffffff845473ef>] j1939_session_fresh_new net/can/j1939/transport.c:1535 [inline]
[<ffffffff845473ef>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff845473ef>] j1939_xtp_rx_rts+0x49f/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84547ea5>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84547ea5>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8453e3f9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8452eea4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8452eea4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8452f560>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8452f6a0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f10bf6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5529
[<ffffffff83f10c6d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5643
[<ffffffff83f10fcc>] process_backlog+0xbc/0x190 net/core/dev.c:5971
[<ffffffff83f1215e>] __napi_poll+0x3e/0x310 net/core/dev.c:6533
[<ffffffff83f12b78>] napi_poll net/core/dev.c:6602 [inline]
[<ffffffff83f12b78>] net_rx_action+0x3d8/0x510 net/core/dev.c:6735
[<ffffffff84b8974d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff88811dbb7400 (size 512):
comm "softirq", pid 0, jiffies 4294947604 (age 10.850s)
hex dump (first 32 bytes):
00 40 32 1f 81 88 ff ff 28 50 32 1f 81 88 ff ff .@2.....(P2.....
28 50 32 1f 81 88 ff ff 18 74 bb 1d 81 88 ff ff (P2......t......
backtrace:
[<ffffffff816339bd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff816339bd>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff816339bd>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff816339bd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
[<ffffffff8157e845>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff84542463>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff84542463>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff84542463>] j1939_session_new+0x53/0x140 net/can/j1939/transport.c:1494
[<ffffffff84547485>] j1939_session_fresh_new net/can/j1939/transport.c:1546 [inline]
[<ffffffff84547485>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff84547485>] j1939_xtp_rx_rts+0x535/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84547ea5>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84547ea5>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8453e3f9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8452eea4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8452eea4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8452f560>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8452f6a0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f10bf6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5529
[<ffffffff83f10c6d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5643
[<ffffffff83f10fcc>] process_backlog+0xbc/0x190 net/core/dev.c:5971
[<ffffffff83f1215e>] __napi_poll+0x3e/0x310 net/core/dev.c:6533
[<ffffffff83f12b78>] napi_poll net/core/dev.c:6602 [inline]
[<ffffffff83f12b78>] net_rx_action+0x3d8/0x510 net/core/dev.c:6735
[<ffffffff84b8974d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553



---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Nikita Zhandarovich

unread,
Jan 19, 2024, 8:27:04 AMJan 19
to syzbot+1d37be...@syzkaller.appspotmail.com, Nikita Zhandarovich, syzkall...@googlegroups.com
Test to make sure the issue is still standing.

#syz test

syzbot

unread,
Jan 19, 2024, 9:23:05 AMJan 19
to linux-...@vger.kernel.org, n.zhand...@fintech.ru, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in corrupted

BUG: memory leak
unreferenced object 0xffff88812162e000 (size 8192):
comm "syz-executor.2", pid 5912, jiffies 4294946210
hex dump (first 32 bytes):
00 e0 62 21 81 88 ff ff 00 e0 62 21 81 88 ff ff ..b!......b!....
00 00 00 00 00 00 00 00 00 00 36 1c 81 88 ff ff ..........6.....
backtrace (crc bbd5015e):
[<ffffffff815fa6f3>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa6f3>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa6f3>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa6f3>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff8457ddd9>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff8457ddd9>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff8457ddd9>] j1939_priv_create net/can/j1939/main.c:135 [inline]
[<ffffffff8457ddd9>] j1939_netdev_start+0x159/0x6f0 net/can/j1939/main.c:272
[<ffffffff8457fa1e>] j1939_sk_bind+0x21e/0x550 net/can/j1939/socket.c:485
[<ffffffff83efe59c>] __sys_bind+0x11c/0x130 net/socket.c:1847
[<ffffffff83efe5cc>] __do_sys_bind net/socket.c:1858 [inline]
[<ffffffff83efe5cc>] __se_sys_bind net/socket.c:1856 [inline]
[<ffffffff83efe5cc>] __x64_sys_bind+0x1c/0x20 net/socket.c:1856
[<ffffffff84bb9910>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
[<ffffffff84bb9910>] do_syscall_64+0x50/0x140 arch/x86/entry/common.c:83
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff888122a49d00 (size 240):
comm "softirq", pid 0, jiffies 4294946210
hex dump (first 32 bytes):
68 4c a6 21 81 88 ff ff 68 4c a6 21 81 88 ff ff hL.!....hL.!....
00 00 36 1c 81 88 ff ff 00 00 00 00 00 00 00 00 ..6.............
backtrace (crc d6a71e41):
[<ffffffff815f9b9a>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815f9b9a>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815f9b9a>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815f9b9a>] kmem_cache_alloc_node+0x28a/0x330 mm/slub.c:3903
[<ffffffff83f11f5f>] __alloc_skb+0x1ef/0x230 net/core/skbuff.c:641
[<ffffffff8458699f>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458699f>] j1939_session_fresh_new net/can/j1939/transport.c:1535 [inline]
[<ffffffff8458699f>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff8458699f>] j1939_xtp_rx_rts+0x49f/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84587455>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84587455>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8457d9a9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8456e3f4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8456e3f4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8456eab0>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8456ebf0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f4a976>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f4a9ed>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f4ad4c>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f4bede>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f4c8f8>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f4c8f8>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bd799d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff888122f20000 (size 131072):
comm "softirq", pid 0, jiffies 4294946210
hex dump (first 32 bytes):
0e 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 (crc f7abe560):
[<ffffffff815f313e>] __kmalloc_large_node+0xde/0x150 mm/slub.c:3935
[<ffffffff815f8f8f>] __do_kmalloc_node mm/slub.c:3969 [inline]
[<ffffffff815f8f8f>] __kmalloc_node_track_caller+0x35f/0x420 mm/slub.c:4001
[<ffffffff83f0e1b6>] kmalloc_reserve+0x96/0x170 net/core/skbuff.c:582
[<ffffffff83f11e45>] __alloc_skb+0xd5/0x230 net/core/skbuff.c:651
[<ffffffff8458699f>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458699f>] j1939_session_fresh_new net/can/j1939/transport.c:1535 [inline]
[<ffffffff8458699f>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff8458699f>] j1939_xtp_rx_rts+0x49f/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84587455>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84587455>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8457d9a9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8456e3f4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8456e3f4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8456eab0>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8456ebf0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f4a976>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f4a9ed>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f4ad4c>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f4bede>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f4c8f8>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f4c8f8>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bd799d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff888121a64c00 (size 512):
comm "softirq", pid 0, jiffies 4294946210
hex dump (first 32 bytes):
00 e0 62 21 81 88 ff ff 28 f0 62 21 81 88 ff ff ..b!....(.b!....
28 f0 62 21 81 88 ff ff 18 4c a6 21 81 88 ff ff (.b!.....L.!....
backtrace (crc 5752fd94):
[<ffffffff815fa6f3>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa6f3>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa6f3>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa6f3>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff84581a13>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff84581a13>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff84581a13>] j1939_session_new+0x53/0x140 net/can/j1939/transport.c:1494
[<ffffffff84586a35>] j1939_session_fresh_new net/can/j1939/transport.c:1546 [inline]
[<ffffffff84586a35>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1631 [inline]
[<ffffffff84586a35>] j1939_xtp_rx_rts+0x535/0xa50 net/can/j1939/transport.c:1735
[<ffffffff84587455>] j1939_tp_cmd_recv net/can/j1939/transport.c:2057 [inline]
[<ffffffff84587455>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2144
[<ffffffff8457d9a9>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff8456e3f4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff8456e3f4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff8456eab0>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff8456ebf0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f4a976>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f4a9ed>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f4ad4c>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f4bede>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f4c8f8>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f4c8f8>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bd799d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553



Tested on:

commit: 9d1694dc Merge tag 'for-6.8/block-2024-01-18' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17efd763e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=447c03a4f5a8d571
dashboard link: https://syzkaller.appspot.com/bug?extid=1d37bef05da87b99c5a6
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

Edward Adam Davis

unread,
Jan 23, 2024, 4:17:41 AMJan 23
to syzbot+1d37be...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test memory leak in j1939_netdev_start

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98b1cc82c4af

diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
index 14c431663233..1d1f1348eeca 100644
--- a/net/can/j1939/socket.c
+++ b/net/can/j1939/socket.c
@@ -141,6 +141,7 @@ static void j1939_sk_queue_drop_all(struct j1939_priv *priv,
sk_session_queue_entry) {
list_del_init(&session->sk_session_queue_entry);
session->err = err;
+ printk("s: %p, %s\n", session, __func__);
j1939_session_put(session);
}
spin_unlock_bh(&jsk->sk_session_queue_lock);
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index fe3df23a2595..0b09bf60b08b 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -278,6 +278,7 @@ static void j1939_session_destroy(struct j1939_session *session)

while ((skb = skb_dequeue(&session->skb_queue)) != NULL) {
/* drop ref taken in j1939_session_skb_queue() */
+ printk("s: %p, skb: %p, %s\n", session, skb, __func__);
skb_unref(skb);
kfree_skb(skb);
}
@@ -1552,6 +1553,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
/* alloc data area */
skb_put(skb, size);
/* skb is recounted in j1939_session_new() */
+ printk("s: %p, skb: %p, %s\n", session, skb, __func__);
return session;
}

@@ -1758,6 +1760,7 @@ static void j1939_xtp_rx_rts(struct j1939_priv *priv, struct sk_buff *skb,
j1939_tp_set_rxtimeout(session, 1250);
}

+ printk("s: %p, %s\n", session, __func__);
j1939_session_put(session);
}


syzbot

unread,
Jan 23, 2024, 4:24:07 AMJan 23
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git on commit 98b1cc82c4af: failed to run ["git" "fetch" "--force" "--tags" "4d52a57a3858a6eee0d0b25cc3a0c9533f747d8f" "98b1cc82c4af"]: exit status 128
fatal: couldn't find remote ref 98b1cc82c4af



Tested on:

commit: [unknown
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98b1cc82c4af
kernel config: https://syzkaller.appspot.com/x/.config?x=f1b9d95ada516af
patch: https://syzkaller.appspot.com/x/patch.diff?x=1401d2d7e80000

Edward Adam Davis

unread,
Jan 23, 2024, 4:39:45 AMJan 23
to syzbot+1d37be...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test memory leak in j1939_netdev_start

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

syzbot

unread,
Jan 23, 2024, 5:05:07 AMJan 23
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in corrupted

BUG: memory leak
unreferenced object 0xffff888122468000 (size 8192):
comm "syz-executor.3", pid 5871, jiffies 4294945607
hex dump (first 32 bytes):
00 80 46 22 81 88 ff ff 00 80 46 22 81 88 ff ff ..F"......F"....
00 00 00 00 00 00 00 00 00 80 03 1b 81 88 ff ff ................
backtrace (crc aa0f28f1):
[<ffffffff815fa713>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa713>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa713>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa713>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff84584249>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff84584249>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff84584249>] j1939_priv_create net/can/j1939/main.c:135 [inline]
[<ffffffff84584249>] j1939_netdev_start+0x159/0x6f0 net/can/j1939/main.c:272
[<ffffffff84585eae>] j1939_sk_bind+0x21e/0x550 net/can/j1939/socket.c:486
[<ffffffff83f04a0c>] __sys_bind+0x11c/0x130 net/socket.c:1847
[<ffffffff83f04a3c>] __do_sys_bind net/socket.c:1858 [inline]
[<ffffffff83f04a3c>] __se_sys_bind net/socket.c:1856 [inline]
[<ffffffff83f04a3c>] __x64_sys_bind+0x1c/0x20 net/socket.c:1856
[<ffffffff84bc08c0>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
[<ffffffff84bc08c0>] do_syscall_64+0x50/0x140 arch/x86/entry/common.c:83
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff888122b02200 (size 240):
comm "softirq", pid 0, jiffies 4294945607
hex dump (first 32 bytes):
68 ac 2a 22 81 88 ff ff 68 ac 2a 22 81 88 ff ff h.*"....h.*"....
00 80 03 1b 81 88 ff ff 00 00 00 00 00 00 00 00 ................
backtrace (crc 54b3c139):
[<ffffffff815f9bba>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815f9bba>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815f9bba>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815f9bba>] kmem_cache_alloc_node+0x28a/0x330 mm/slub.c:3903
[<ffffffff83f183cf>] __alloc_skb+0x1ef/0x230 net/core/skbuff.c:641
[<ffffffff8458ce6a>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458ce6a>] j1939_session_fresh_new net/can/j1939/transport.c:1536 [inline]
[<ffffffff8458ce6a>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1633 [inline]
[<ffffffff8458ce6a>] j1939_xtp_rx_rts+0x4ba/0xa70 net/can/j1939/transport.c:1737
[<ffffffff8458d925>] j1939_tp_cmd_recv net/can/j1939/transport.c:2060 [inline]
[<ffffffff8458d925>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2147
[<ffffffff84583e19>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff84574864>] deliver net/can/af_can.c:572 [inline]
[<ffffffff84574864>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff84574f20>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff84575060>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f50de6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f50e5d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f511bc>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f5234e>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f52d68>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f52d68>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bde94d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff888122b40000 (size 131072):
comm "softirq", pid 0, jiffies 4294945607
hex dump (first 32 bytes):
0e 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 (crc f7abe560):
[<ffffffff815f315e>] __kmalloc_large_node+0xde/0x150 mm/slub.c:3935
[<ffffffff815f8faf>] __do_kmalloc_node mm/slub.c:3969 [inline]
[<ffffffff815f8faf>] __kmalloc_node_track_caller+0x35f/0x420 mm/slub.c:4001
[<ffffffff83f14626>] kmalloc_reserve+0x96/0x170 net/core/skbuff.c:582
[<ffffffff83f182b5>] __alloc_skb+0xd5/0x230 net/core/skbuff.c:651
[<ffffffff8458ce6a>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458ce6a>] j1939_session_fresh_new net/can/j1939/transport.c:1536 [inline]
[<ffffffff8458ce6a>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1633 [inline]
[<ffffffff8458ce6a>] j1939_xtp_rx_rts+0x4ba/0xa70 net/can/j1939/transport.c:1737
[<ffffffff8458d925>] j1939_tp_cmd_recv net/can/j1939/transport.c:2060 [inline]
[<ffffffff8458d925>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2147
[<ffffffff84583e19>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff84574864>] deliver net/can/af_can.c:572 [inline]
[<ffffffff84574864>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff84574f20>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff84575060>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f50de6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f50e5d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f511bc>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f5234e>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f52d68>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f52d68>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bde94d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff8881222aac00 (size 512):
comm "softirq", pid 0, jiffies 4294945607
hex dump (first 32 bytes):
00 80 46 22 81 88 ff ff 28 90 46 22 81 88 ff ff ..F"....(.F"....
28 90 46 22 81 88 ff ff 18 ac 2a 22 81 88 ff ff (.F"......*"....
backtrace (crc 32877ad9):
[<ffffffff815fa713>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa713>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa713>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa713>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff84587ea3>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff84587ea3>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff84587ea3>] j1939_session_new+0x53/0x140 net/can/j1939/transport.c:1495
[<ffffffff8458cefc>] j1939_session_fresh_new net/can/j1939/transport.c:1547 [inline]
[<ffffffff8458cefc>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1633 [inline]
[<ffffffff8458cefc>] j1939_xtp_rx_rts+0x54c/0xa70 net/can/j1939/transport.c:1737
[<ffffffff8458d925>] j1939_tp_cmd_recv net/can/j1939/transport.c:2060 [inline]
[<ffffffff8458d925>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2147
[<ffffffff84583e19>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff84574864>] deliver net/can/af_can.c:572 [inline]
[<ffffffff84574864>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff84574f20>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff84575060>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f50de6>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f50e5d>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f511bc>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f5234e>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f52d68>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f52d68>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bde94d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553



Tested on:

commit: 7ed2632e drm/ttm: fix ttm pool initialization for no-d..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=1681d2d7e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9f6b64adeddd3dbc
dashboard link: https://syzkaller.appspot.com/bug?extid=1d37bef05da87b99c5a6
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1770fa6be80000

Edward Adam Davis

unread,
Jan 23, 2024, 8:24:47 PMJan 23
to syzbot+1d37be...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test memory leak in j1939_netdev_start

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
index 14c431663233..1d1f1348eeca 100644
--- a/net/can/j1939/socket.c
+++ b/net/can/j1939/socket.c
@@ -141,6 +141,7 @@ static void j1939_sk_queue_drop_all(struct j1939_priv *priv,
sk_session_queue_entry) {
list_del_init(&session->sk_session_queue_entry);
session->err = err;
+ printk("s: %p, %s\n", session, __func__);
j1939_session_put(session);
}
spin_unlock_bh(&jsk->sk_session_queue_lock);
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index fe3df23a2595..4e5f6037db46 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -283,6 +283,7 @@ static void j1939_session_destroy(struct j1939_session *session)
}
__j1939_session_drop(session);
j1939_priv_put(session->priv);
+ printk("free session: %p, %s\n", session, __func__);
kfree(session);
}

@@ -1552,6 +1553,8 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
/* alloc data area */
skb_put(skb, size);
/* skb is recounted in j1939_session_new() */
+ printk("s: %p, skb: %p, size: %d, csk: %d, %s\n",
+ session, skb, size, sizeof(struct can_skb_priv), __func__);
return session;
}

@@ -1758,6 +1761,7 @@ static void j1939_xtp_rx_rts(struct j1939_priv *priv, struct sk_buff *skb,
j1939_tp_set_rxtimeout(session, 1250);
}

+ printk("s: %p, %s\n", session, __func__);
j1939_session_put(session);
}

@@ -2005,6 +2009,8 @@ struct j1939_session *j1939_tp_send(struct j1939_priv *priv,
if (!session)
return ERR_PTR(-ENOMEM);

+ printk("s: %p, size: %d, %s\n", session, size, __func__);
+
/* skb is recounted in j1939_session_new() */
sock_hold(skb->sk);
session->sk = skb->sk;

syzbot

unread,
Jan 23, 2024, 9:51:05 PMJan 23
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in corrupted

BUG: memory leak
unreferenced object 0xffff88810e94a000 (size 8192):
comm "syz-executor.4", pid 5915, jiffies 4294946150
hex dump (first 32 bytes):
00 a0 94 0e 81 88 ff ff 00 a0 94 0e 81 88 ff ff ................
00 00 00 00 00 00 00 00 00 00 70 10 81 88 ff ff ..........p.....
backtrace (crc 77c14305):
[<ffffffff815fa713>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa713>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa713>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa713>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff845842c9>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff845842c9>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff845842c9>] j1939_priv_create net/can/j1939/main.c:135 [inline]
[<ffffffff845842c9>] j1939_netdev_start+0x159/0x6f0 net/can/j1939/main.c:272
[<ffffffff84585f2e>] j1939_sk_bind+0x21e/0x550 net/can/j1939/socket.c:486
[<ffffffff83f04a8c>] __sys_bind+0x11c/0x130 net/socket.c:1847
[<ffffffff83f04abc>] __do_sys_bind net/socket.c:1858 [inline]
[<ffffffff83f04abc>] __se_sys_bind net/socket.c:1856 [inline]
[<ffffffff83f04abc>] __x64_sys_bind+0x1c/0x20 net/socket.c:1856
[<ffffffff84bc08c0>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
[<ffffffff84bc08c0>] do_syscall_64+0x50/0x140 arch/x86/entry/common.c:83
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff888122f26000 (size 8192):
comm "syz-executor.1", pid 5923, jiffies 4294946164
hex dump (first 32 bytes):
00 60 f2 22 81 88 ff ff 00 60 f2 22 81 88 ff ff .`.".....`."....
00 00 00 00 00 00 00 00 00 80 60 10 81 88 ff ff ..........`.....
backtrace (crc c2cb0355):
[<ffffffff815fa713>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa713>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa713>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa713>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff845842c9>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff845842c9>] kzalloc include/linux/slab.h:711 [inline]
[<ffffffff845842c9>] j1939_priv_create net/can/j1939/main.c:135 [inline]
[<ffffffff845842c9>] j1939_netdev_start+0x159/0x6f0 net/can/j1939/main.c:272
[<ffffffff84585f2e>] j1939_sk_bind+0x21e/0x550 net/can/j1939/socket.c:486
[<ffffffff83f04a8c>] __sys_bind+0x11c/0x130 net/socket.c:1847
[<ffffffff83f04abc>] __do_sys_bind net/socket.c:1858 [inline]
[<ffffffff83f04abc>] __se_sys_bind net/socket.c:1856 [inline]
[<ffffffff83f04abc>] __x64_sys_bind+0x1c/0x20 net/socket.c:1856
[<ffffffff84bc08c0>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
[<ffffffff84bc08c0>] do_syscall_64+0x50/0x140 arch/x86/entry/common.c:83
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff888122c06700 (size 240):
comm "softirq", pid 0, jiffies 4294946164
hex dump (first 32 bytes):
68 42 2f 22 81 88 ff ff 68 42 2f 22 81 88 ff ff hB/"....hB/"....
00 80 60 10 81 88 ff ff 00 00 00 00 00 00 00 00 ..`.............
backtrace (crc 205e59a3):
[<ffffffff815f9bba>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815f9bba>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815f9bba>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815f9bba>] kmem_cache_alloc_node+0x28a/0x330 mm/slub.c:3903
[<ffffffff83f1844f>] __alloc_skb+0x1ef/0x230 net/core/skbuff.c:641
[<ffffffff8458ceea>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458ceea>] j1939_session_fresh_new net/can/j1939/transport.c:1536 [inline]
[<ffffffff8458ceea>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1634 [inline]
[<ffffffff8458ceea>] j1939_xtp_rx_rts+0x4ba/0xa70 net/can/j1939/transport.c:1738
[<ffffffff8458d9d5>] j1939_tp_cmd_recv net/can/j1939/transport.c:2063 [inline]
[<ffffffff8458d9d5>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2150
[<ffffffff84583e99>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff845748e4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff845748e4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff84574fa0>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff845750e0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f50e66>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f50edd>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f5123c>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f523ce>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f52de8>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f52de8>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bde94d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553

BUG: memory leak
unreferenced object 0xffff8881231e0000 (size 131072):
comm "softirq", pid 0, jiffies 4294946164
hex dump (first 32 bytes):
0e 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 (crc f7abe560):
[<ffffffff815f315e>] __kmalloc_large_node+0xde/0x150 mm/slub.c:3935
[<ffffffff815f8faf>] __do_kmalloc_node mm/slub.c:3969 [inline]
[<ffffffff815f8faf>] __kmalloc_node_track_caller+0x35f/0x420 mm/slub.c:4001
[<ffffffff83f146a6>] kmalloc_reserve+0x96/0x170 net/core/skbuff.c:582
[<ffffffff83f18335>] __alloc_skb+0xd5/0x230 net/core/skbuff.c:651
[<ffffffff8458ceea>] alloc_skb include/linux/skbuff.h:1296 [inline]
[<ffffffff8458ceea>] j1939_session_fresh_new net/can/j1939/transport.c:1536 [inline]
[<ffffffff8458ceea>] j1939_xtp_rx_rts_session_new net/can/j1939/transport.c:1634 [inline]
[<ffffffff8458ceea>] j1939_xtp_rx_rts+0x4ba/0xa70 net/can/j1939/transport.c:1738
[<ffffffff8458d9d5>] j1939_tp_cmd_recv net/can/j1939/transport.c:2063 [inline]
[<ffffffff8458d9d5>] j1939_tp_recv+0x1b5/0x7f0 net/can/j1939/transport.c:2150
[<ffffffff84583e99>] j1939_can_recv+0x349/0x4e0 net/can/j1939/main.c:112
[<ffffffff845748e4>] deliver net/can/af_can.c:572 [inline]
[<ffffffff845748e4>] can_rcv_filter+0xd4/0x290 net/can/af_can.c:606
[<ffffffff84574fa0>] can_receive+0xf0/0x140 net/can/af_can.c:663
[<ffffffff845750e0>] can_rcv+0xf0/0x130 net/can/af_can.c:687
[<ffffffff83f50e66>] __netif_receive_skb_one_core+0x66/0x90 net/core/dev.c:5534
[<ffffffff83f50edd>] __netif_receive_skb+0x1d/0x90 net/core/dev.c:5648
[<ffffffff83f5123c>] process_backlog+0xbc/0x190 net/core/dev.c:5976
[<ffffffff83f523ce>] __napi_poll+0x3e/0x310 net/core/dev.c:6576
[<ffffffff83f52de8>] napi_poll net/core/dev.c:6645 [inline]
[<ffffffff83f52de8>] net_rx_action+0x3d8/0x510 net/core/dev.c:6778
[<ffffffff84bde94d>] __do_softirq+0xbd/0x2b0 kernel/softirq.c:553



Tested on:

commit: 615d3006 Merge tag 'trace-v6.8-rc1' of git://git.kerne..
console output: https://syzkaller.appspot.com/x/log.txt?x=100e8b3be80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9f6b64adeddd3dbc
dashboard link: https://syzkaller.appspot.com/bug?extid=1d37bef05da87b99c5a6
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17d2a6f7e80000

Reply all
Reply to author
Forward
0 new messages