syzbot


memory leak in radix_tree_insert

Status: fixed on 2021/11/10 00:50
Subsystems: arm-msm net
[Documentation on labels]
Reported-by: syzbot+739016799a89c530b32a@syzkaller.appspotmail.com
Fix commit: 8a03dd925786 net: qrtr: Fix memory leak on qrtr_tx_wait failure
First crash: 1291d, last: 1291d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.10 000/188] 5.10.30-rc1 review 199 (199) 2021/04/13 10:44
[PATCH 5.11 000/210] 5.11.14-rc1 review 214 (214) 2021/04/13 04:46
[PATCH] net: qrtr: Fix memory leak on qrtr_tx_wait failure 4 (4) 2021/03/30 20:50
[syzbot] memory leak in radix_tree_insert 0 (1) 2021/03/30 13:16
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in radix_tree_insert (2) arm-msm net C 1 298d 308d 0/28 upstream: reported C repro on 2023/12/08 00:52

Sample crash report:
BUG: memory leak
unreferenced object 0xffff88810ffa0900 (size 576):
  comm "syz-executor055", pid 8413, jiffies 4294943689 (age 19.180s)
  hex dump (first 32 bytes):
    3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    b0 91 09 10 81 88 ff ff 18 09 fa 0f 81 88 ff ff  ................
  backtrace:
    [<ffffffff822f6f68>] radix_tree_node_alloc.constprop.0+0x78/0x180 lib/radix-tree.c:274
    [<ffffffff822f887c>] __radix_tree_create lib/radix-tree.c:622 [inline]
    [<ffffffff822f887c>] radix_tree_insert+0x13c/0x310 lib/radix-tree.c:710
    [<ffffffff840cc337>] qrtr_tx_wait net/qrtr/qrtr.c:274 [inline]
    [<ffffffff840cc337>] qrtr_node_enqueue+0x547/0x610 net/qrtr/qrtr.c:342
    [<ffffffff840ce1a2>] qrtr_bcast_enqueue+0x62/0xc0 net/qrtr/qrtr.c:885
    [<ffffffff840ccf1e>] qrtr_sendmsg+0x20e/0x500 net/qrtr/qrtr.c:986
    [<ffffffff8363a836>] sock_sendmsg_nosec net/socket.c:654 [inline]
    [<ffffffff8363a836>] sock_sendmsg+0x56/0x80 net/socket.c:674
    [<ffffffff8363a957>] sock_write_iter+0xf7/0x180 net/socket.c:1001
    [<ffffffff81545057>] call_write_iter include/linux/fs.h:1977 [inline]
    [<ffffffff81545057>] new_sync_write+0x1d7/0x2b0 fs/read_write.c:518
    [<ffffffff815486d1>] vfs_write+0x351/0x400 fs/read_write.c:605
    [<ffffffff81548a4b>] ksys_write+0x12b/0x160 fs/read_write.c:658
    [<ffffffff842df20d>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888112449860 (size 32):
  comm "syz-executor055", pid 8414, jiffies 4294944254 (age 13.530s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 68 98 44 12 81 88 ff ff  ........h.D.....
    68 98 44 12 81 88 ff ff 01 00 00 00 00 00 00 00  h.D.............
  backtrace:
    [<ffffffff840cc2ff>] kmalloc include/linux/slab.h:554 [inline]
    [<ffffffff840cc2ff>] kzalloc include/linux/slab.h:684 [inline]
    [<ffffffff840cc2ff>] qrtr_tx_wait net/qrtr/qrtr.c:271 [inline]
    [<ffffffff840cc2ff>] qrtr_node_enqueue+0x50f/0x610 net/qrtr/qrtr.c:342
    [<ffffffff840ce1a2>] qrtr_bcast_enqueue+0x62/0xc0 net/qrtr/qrtr.c:885
    [<ffffffff840ccf1e>] qrtr_sendmsg+0x20e/0x500 net/qrtr/qrtr.c:986
    [<ffffffff8363a836>] sock_sendmsg_nosec net/socket.c:654 [inline]
    [<ffffffff8363a836>] sock_sendmsg+0x56/0x80 net/socket.c:674
    [<ffffffff8363a957>] sock_write_iter+0xf7/0x180 net/socket.c:1001
    [<ffffffff81545057>] call_write_iter include/linux/fs.h:1977 [inline]
    [<ffffffff81545057>] new_sync_write+0x1d7/0x2b0 fs/read_write.c:518
    [<ffffffff815486d1>] vfs_write+0x351/0x400 fs/read_write.c:605
    [<ffffffff81548a4b>] ksys_write+0x12b/0x160 fs/read_write.c:658
    [<ffffffff842df20d>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
    [<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/03/30 10:05 upstream 1e43c377a79f 6a81331a .config console log report syz C ci-upstream-gce-leak memory leak in radix_tree_insert
* Struck through repros no longer work on HEAD.