All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231208074438.4102005-1-lizhi.xu@windriver.com>
@ 2023-12-08  8:17 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08  8:17 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

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

lib/radix-tree.c:591:17: error: implicit declaration of function 'node_tag_set'; did you mean 'root_tag_set'? [-Werror=implicit-function-declaration]
lib/radix-tree.c:594:25: error: implicit declaration of function 'node_tag_clear'; did you mean 'root_tag_clear'? [-Werror=implicit-function-declaration]
lib/radix-tree.c:596:9: error: implicit declaration of function 'replace_slot'; did you mean 'replace_fops'? [-Werror=implicit-function-declaration]
lib/radix-tree.c:843:13: error: static declaration of 'replace_slot' follows non-static declaration
lib/radix-tree.c:958:13: error: static declaration of 'node_tag_set' follows non-static declaration
lib/radix-tree.c:1015:13: error: static declaration of 'node_tag_clear' follows non-static declaration


Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=178c2ed4e80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231211051540.1882463-1-lizhi.xu@windriver.com>
@ 2023-12-11  5:52 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-11  5:52 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+006987d1be3586e13555@syzkaller.appspotmail.com

Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=10325ab6e80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1654f06ce80000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231211042442.1442601-1-lizhi.xu@windriver.com>
@ 2023-12-11  4:41 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-11  4:41 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel NULL pointer dereference in radix_tree_insert

RBP: 00007fe1bdd63120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 000000000000000b R14: 00007fe1bd19bf80 R15: 00007ffff40ae278
 </TASK>
nc: 0000000000000000
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 11abdb067 P4D 11abdb067 PUD 11a311067 PMD 0 
Oops: 0000 [#1] PREEMPT SMP
CPU: 0 PID: 5752 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:radix_tree_descend lib/radix-tree.c:88 [inline]
RIP: 0010:__radix_tree_create lib/radix-tree.c:655 [inline]
RIP: 0010:radix_tree_insert+0x379/0x400 lib/radix-tree.c:730
Code: ba 89 fc 89 de 44 89 ef e8 54 b3 89 fc 41 39 dd 73 6e e8 ea ba 89 fc 4c 8b 7c 24 10 4c 89 f0 41 83 c5 06 48 c7 c7 b5 cf a7 85 <41> 0f b6 0f 48 d3 e8 83 e0 3f 48 83 c0 04 49 8b 5c c7 08 48 89 de
RSP: 0018:ffffc900049d3c18 EFLAGS: 00010202
RAX: fffffffffffffffe RBX: 0000000000000042 RCX: ffffffff84b526dc
RDX: ffff888106cc0000 RSI: ffffffff84b526e6 RDI: ffffffff85a7cfb5
RBP: 000000000000003f R08: 0000000000000004 R09: 0000000000000024
R10: 0000000000000042 R11: 205d323537355420 R12: ffff88810b7746d8
R13: 000000000000002a R14: fffffffffffffffe R15: 0000000000000000
FS:  00007fe1bdd636c0(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000011ae79000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
 qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
 qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
 qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x52/0xa0 net/socket.c:745
 sock_write_iter+0xfb/0x180 net/socket.c:1158
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x327/0x590 fs/read_write.c:584
 ksys_write+0x13b/0x170 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fe1bd07cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe1bdd630c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fe1bd19bf80 RCX: 00007fe1bd07cae9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007fe1bdd63120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 000000000000000b R14: 00007fe1bd19bf80 R15: 00007ffff40ae278
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:radix_tree_descend lib/radix-tree.c:88 [inline]
RIP: 0010:__radix_tree_create lib/radix-tree.c:655 [inline]
RIP: 0010:radix_tree_insert+0x379/0x400 lib/radix-tree.c:730
Code: ba 89 fc 89 de 44 89 ef e8 54 b3 89 fc 41 39 dd 73 6e e8 ea ba 89 fc 4c 8b 7c 24 10 4c 89 f0 41 83 c5 06 48 c7 c7 b5 cf a7 85 <41> 0f b6 0f 48 d3 e8 83 e0 3f 48 83 c0 04 49 8b 5c c7 08 48 89 de
RSP: 0018:ffffc900049d3c18 EFLAGS: 00010202
RAX: fffffffffffffffe RBX: 0000000000000042 RCX: ffffffff84b526dc
RDX: ffff888106cc0000 RSI: ffffffff84b526e6 RDI: ffffffff85a7cfb5
RBP: 000000000000003f R08: 0000000000000004 R09: 0000000000000024
R10: 0000000000000042 R11: 205d323537355420 R12: ffff88810b7746d8
R13: 000000000000002a R14: fffffffffffffffe R15: 0000000000000000
FS:  00007fe1bdd636c0(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000011ae79000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	ba 89 fc 89 de       	mov    $0xde89fc89,%edx
   5:	44 89 ef             	mov    %r13d,%edi
   8:	e8 54 b3 89 fc       	call   0xfc89b361
   d:	41 39 dd             	cmp    %ebx,%r13d
  10:	73 6e                	jae    0x80
  12:	e8 ea ba 89 fc       	call   0xfc89bb01
  17:	4c 8b 7c 24 10       	mov    0x10(%rsp),%r15
  1c:	4c 89 f0             	mov    %r14,%rax
  1f:	41 83 c5 06          	add    $0x6,%r13d
  23:	48 c7 c7 b5 cf a7 85 	mov    $0xffffffff85a7cfb5,%rdi
* 2a:	41 0f b6 0f          	movzbl (%r15),%ecx <-- trapping instruction
  2e:	48 d3 e8             	shr    %cl,%rax
  31:	83 e0 3f             	and    $0x3f,%eax
  34:	48 83 c0 04          	add    $0x4,%rax
  38:	49 8b 5c c7 08       	mov    0x8(%r15,%rax,8),%rbx
  3d:	48 89 de             	mov    %rbx,%rsi


Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1263f02ae80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=14707d0ae80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_5DCBB36DE37A697AA3A5A44C176557784605@qq.com>
@ 2023-12-10  8:13 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  8:13 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

2023/12/10 08:04:23 executed programs: 3
BUG: memory leak
unreferenced object 0xffff88810b920000 (size 576):
  comm "syz-executor.0", pid 5753, jiffies 4294945520 (age 13.500s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    30 79 97 0c 81 88 ff ff 18 00 92 0b 81 88 ff ff  0y..............
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10d0>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10d0>] qrtr_node_enqueue+0x5d0/0x6a0 net/qrtr/af_qrtr.c:356
    [<ffffffff84ae2786>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:899
    [<ffffffff84ae3362>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:1000
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810b920248 (size 576):
  comm "syz-executor.0", pid 5753, jiffies 4294945520 (age 13.500s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 00 00 92 0b 81 88 ff ff  6...............
    30 79 97 0c 81 88 ff ff 60 02 92 0b 81 88 ff ff  0y......`.......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10d0>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10d0>] qrtr_node_enqueue+0x5d0/0x6a0 net/qrtr/af_qrtr.c:356
    [<ffffffff84ae2786>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:899
    [<ffffffff84ae3362>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:1000
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810b920490 (size 576):
  comm "syz-executor.0", pid 5753, jiffies 4294945520 (age 13.500s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 48 02 92 0b 81 88 ff ff  0?......H.......
    30 79 97 0c 81 88 ff ff a8 04 92 0b 81 88 ff ff  0y..............
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10d0>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10d0>] qrtr_node_enqueue+0x5d0/0x6a0 net/qrtr/af_qrtr.c:356
    [<ffffffff84ae2786>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:899
    [<ffffffff84ae3362>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:1000
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810b9206d8 (size 576):
  comm "syz-executor.0", pid 5753, jiffies 4294945520 (age 13.500s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 90 04 92 0b 81 88 ff ff  *?..............
    30 79 97 0c 81 88 ff ff f0 06 92 0b 81 88 ff ff  0y..............
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10d0>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10d0>] qrtr_node_enqueue+0x5d0/0x6a0 net/qrtr/af_qrtr.c:356
    [<ffffffff84ae2786>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:899
    [<ffffffff84ae3362>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:1000
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=120e98b2e80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=13605feee80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_F5872516BA75BB5A33CC9E661B2F4BB81B08@qq.com>
@ 2023-12-10  6:30 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  6:30 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

2023/12/10 06:24:31 executed programs: 3
BUG: memory leak
unreferenced object 0xffff88810dca76d0 (size 576):
  comm "syz-executor.0", pid 5751, jiffies 4294945011 (age 13.020s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    30 76 57 0c 81 88 ff ff e8 76 ca 0d 81 88 ff ff  0vW......v......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10b8>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10b8>] qrtr_node_enqueue+0x5b8/0x670 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2756>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3332>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810dca66d8 (size 576):
  comm "syz-executor.0", pid 5751, jiffies 4294945011 (age 13.020s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 d0 76 ca 0d 81 88 ff ff  6........v......
    30 76 57 0c 81 88 ff ff f0 66 ca 0d 81 88 ff ff  0vW......f......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10b8>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10b8>] qrtr_node_enqueue+0x5b8/0x670 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2756>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3332>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810dd0f488 (size 576):
  comm "syz-executor.0", pid 5751, jiffies 4294945011 (age 13.020s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 d8 66 ca 0d 81 88 ff ff  0?.......f......
    30 76 57 0c 81 88 ff ff a0 f4 d0 0d 81 88 ff ff  0vW.............
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10b8>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10b8>] qrtr_node_enqueue+0x5b8/0x670 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2756>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3332>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff8881005e0000 (size 576):
  comm "syz-executor.0", pid 5751, jiffies 4294945011 (age 13.020s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 88 f4 d0 0d 81 88 ff ff  *?..............
    30 76 57 0c 81 88 ff ff 18 00 5e 00 81 88 ff ff  0vW.......^.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:636 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:724
    [<ffffffff84ae10b8>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae10b8>] qrtr_node_enqueue+0x5b8/0x670 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2756>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3332>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de2f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de2f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17e587dae80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1626d7eee80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_9CCF8C7BE26EA02CF16DE894A8E88EEDA60A@qq.com>
@ 2023-12-10  5:39 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  5:39 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+006987d1be3586e13555@syzkaller.appspotmail.com

Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=113d92bce80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=11778c96e80000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_FDEC79DE6C3C2C356F409770E8F6EFC2CE0A@qq.com>
@ 2023-12-10  4:48 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  4:48 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

BUG: memory leak
unreferenced object 0xffff88810bad6db0 (size 576):
  comm "syz-executor.0", pid 5766, jiffies 4294945919 (age 13.560s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    f0 b3 c9 1b 81 88 ff ff c8 6d ad 0b 81 88 ff ff  .........m......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b5252b>] __radix_tree_create lib/radix-tree.c:628 [inline]
    [<ffffffff84b5252b>] radix_tree_insert+0x16b/0x3a0 lib/radix-tree.c:717
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x640 net/qrtr/af_qrtr.c:349
    [<ffffffff84ae2726>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:892
    [<ffffffff84ae3302>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:993
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de4f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de4f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c246000 (size 576):
  comm "syz-executor.0", pid 5766, jiffies 4294945920 (age 13.550s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 b0 6d ad 0b 81 88 ff ff  6........m......
    f0 b3 c9 1b 81 88 ff ff 18 60 24 0c 81 88 ff ff  .........`$.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b5252b>] __radix_tree_create lib/radix-tree.c:628 [inline]
    [<ffffffff84b5252b>] radix_tree_insert+0x16b/0x3a0 lib/radix-tree.c:717
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x640 net/qrtr/af_qrtr.c:349
    [<ffffffff84ae2726>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:892
    [<ffffffff84ae3302>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:993
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de4f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de4f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c246248 (size 576):
  comm "syz-executor.0", pid 5766, jiffies 4294945921 (age 13.540s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 00 60 24 0c 81 88 ff ff  0?.......`$.....
    f0 b3 c9 1b 81 88 ff ff 60 62 24 0c 81 88 ff ff  ........`b$.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b5252b>] __radix_tree_create lib/radix-tree.c:628 [inline]
    [<ffffffff84b5252b>] radix_tree_insert+0x16b/0x3a0 lib/radix-tree.c:717
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x640 net/qrtr/af_qrtr.c:349
    [<ffffffff84ae2726>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:892
    [<ffffffff84ae3302>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:993
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de4f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de4f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c246490 (size 576):
  comm "syz-executor.0", pid 5766, jiffies 4294945921 (age 13.540s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 48 62 24 0c 81 88 ff ff  *?......Hb$.....
    f0 b3 c9 1b 81 88 ff ff a8 64 24 0c 81 88 ff ff  .........d$.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b5252b>] __radix_tree_create lib/radix-tree.c:628 [inline]
    [<ffffffff84b5252b>] radix_tree_insert+0x16b/0x3a0 lib/radix-tree.c:717
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x640 net/qrtr/af_qrtr.c:349
    [<ffffffff84ae2726>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:892
    [<ffffffff84ae3302>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:993
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6de4f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6de4f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=151b7d6ce80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1242ef32e80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_1571C9B12ED06EED4CAC67FD86C052FC4606@qq.com>
@ 2023-12-10  4:08 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  4:08 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

2023/12/10 04:02:40 executed programs: 1
BUG: memory leak
unreferenced object 0xffff88810e4ac248 (size 576):
  comm "syz-executor.0", pid 5510, jiffies 4294944556 (age 13.040s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    30 3c 8d 1a 81 88 ff ff 60 c2 4a 0e 81 88 ff ff  0<......`.J.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae1012>] qrtr_tx_wait net/qrtr/af_qrtr.c:281 [inline]
    [<ffffffff84ae1012>] qrtr_node_enqueue+0x512/0x6d0 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae27b6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3392>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e4ac000 (size 576):
  comm "syz-executor.0", pid 5510, jiffies 4294944556 (age 13.040s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 48 c2 4a 0e 81 88 ff ff  6.......H.J.....
    30 3c 8d 1a 81 88 ff ff 18 c0 4a 0e 81 88 ff ff  0<........J.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae1012>] qrtr_tx_wait net/qrtr/af_qrtr.c:281 [inline]
    [<ffffffff84ae1012>] qrtr_node_enqueue+0x512/0x6d0 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae27b6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3392>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e4adda8 (size 576):
  comm "syz-executor.0", pid 5510, jiffies 4294944556 (age 13.040s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 00 c0 4a 0e 81 88 ff ff  0?........J.....
    30 3c 8d 1a 81 88 ff ff c0 dd 4a 0e 81 88 ff ff  0<........J.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae1012>] qrtr_tx_wait net/qrtr/af_qrtr.c:281 [inline]
    [<ffffffff84ae1012>] qrtr_node_enqueue+0x512/0x6d0 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae27b6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3392>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e4da000 (size 576):
  comm "syz-executor.0", pid 5510, jiffies 4294944556 (age 13.040s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 a8 dd 4a 0e 81 88 ff ff  *?........J.....
    30 3c 8d 1a 81 88 ff ff 18 a0 4d 0e 81 88 ff ff  0<........M.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae1012>] qrtr_tx_wait net/qrtr/af_qrtr.c:281 [inline]
    [<ffffffff84ae1012>] qrtr_node_enqueue+0x512/0x6d0 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae27b6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3392>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1485aebce80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=10dfa02ae80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_0E30CFAC0DE825820DBC923D5DE75DAF1907@qq.com>
@ 2023-12-10  1:19 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-10  1:19 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

BUG: memory leak
unreferenced object 0xffff88810e5afda8 (size 576):
  comm "syz-executor.0", pid 5489, jiffies 4294944355 (age 12.710s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    70 ee 73 1b 81 88 ff ff c0 fd 5a 0e 81 88 ff ff  p.s.......Z.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae108c>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae108c>] qrtr_node_enqueue+0x58c/0x660 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2746>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3322>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e5ec248 (size 576):
  comm "syz-executor.0", pid 5489, jiffies 4294944355 (age 12.710s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 a8 fd 5a 0e 81 88 ff ff  6.........Z.....
    70 ee 73 1b 81 88 ff ff 60 c2 5e 0e 81 88 ff ff  p.s.....`.^.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae108c>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae108c>] qrtr_node_enqueue+0x58c/0x660 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2746>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3322>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e635488 (size 576):
  comm "syz-executor.0", pid 5489, jiffies 4294944355 (age 12.710s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 48 c2 5e 0e 81 88 ff ff  0?......H.^.....
    70 ee 73 1b 81 88 ff ff a0 54 63 0e 81 88 ff ff  p.s......Tc.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae108c>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae108c>] qrtr_node_enqueue+0x58c/0x660 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2746>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3322>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810e4fa000 (size 576):
  comm "syz-executor.0", pid 5489, jiffies 4294944355 (age 12.710s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 88 54 63 0e 81 88 ff ff  *?.......Tc.....
    70 ee 73 1b 81 88 ff ff 18 a0 4f 0e 81 88 ff ff  p.s.......O.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae108c>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae108c>] qrtr_node_enqueue+0x58c/0x660 net/qrtr/af_qrtr.c:354
    [<ffffffff84ae2746>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:897
    [<ffffffff84ae3322>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:998
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=15858332e80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=15b888b6e80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_140DE9120A5D895DEA192FCF900D9FA5F807@qq.com>
@ 2023-12-09  7:10 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-09  7:10 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

net/qrtr/af_qrtr.c:293:44: error: 'struct qrtr_tx_flow' has no member named 'failed'; did you mean 'tx_failed'?
net/qrtr/af_qrtr.c:299:49: error: 'struct qrtr_tx_flow' has no member named 'failed'; did you mean 'tx_failed'?


Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=11343fcae80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_366443176A9766C6D8D36A8374896363B605@qq.com>
@ 2023-12-09  7:05 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-09  7:05 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

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

net/qrtr/af_qrtr.c:293:44: error: 'struct qrtr_tx_flow' has no member named 'failed'; did you mean 'tx_failed'?
net/qrtr/af_qrtr.c:299:49: error: 'struct qrtr_tx_flow' has no member named 'failed'; did you mean 'tx_failed'?


Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1508339ce80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <tencent_170675C9766F66183C77360A96A237AE4B09@qq.com>
@ 2023-12-09  5:17 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-09  5:17 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+006987d1be3586e13555@syzkaller.appspotmail.com

Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=14433bdae80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=14de5e6ce80000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231208094538.2466543-1-lizhi.xu@windriver.com>
@ 2023-12-08 10:59 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08 10:59 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

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

2023/12/08 10:49:43 executed programs: 1
BUG: memory leak
unreferenced object 0xffff88810c5a6000 (size 576):
  comm "syz-executor.0", pid 5491, jiffies 4294944531 (age 12.550s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    b0 ed 2e 1b 81 88 ff ff 18 60 5a 0c 81 88 ff ff  .........`Z.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:278
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:626 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x370 lib/radix-tree.c:714
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae2716>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32f2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6dddf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6dddf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c5a6248 (size 576):
  comm "syz-executor.0", pid 5491, jiffies 4294944531 (age 12.550s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 00 60 5a 0c 81 88 ff ff  6........`Z.....
    b0 ed 2e 1b 81 88 ff ff 60 62 5a 0c 81 88 ff ff  ........`bZ.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:278
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:626 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x370 lib/radix-tree.c:714
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae2716>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32f2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6dddf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6dddf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c5a6490 (size 576):
  comm "syz-executor.0", pid 5491, jiffies 4294944531 (age 12.550s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 48 62 5a 0c 81 88 ff ff  0?......HbZ.....
    b0 ed 2e 1b 81 88 ff ff a8 64 5a 0c 81 88 ff ff  .........dZ.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:278
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:626 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x370 lib/radix-tree.c:714
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae2716>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32f2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6dddf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6dddf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c5a66d8 (size 576):
  comm "syz-executor.0", pid 5491, jiffies 4294944531 (age 12.550s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 90 64 5a 0c 81 88 ff ff  *?.......dZ.....
    b0 ed 2e 1b 81 88 ff ff f0 66 5a 0c 81 88 ff ff  .........fZ.....
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:278
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:626 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x370 lib/radix-tree.c:714
    [<ffffffff84ae107d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae107d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae2716>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32f2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c42>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c42>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d8b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6dddf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6dddf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=102f9bcae80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1369870ee80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231208065944.3611430-1-lizhi.xu@windriver.com>
@ 2023-12-08  7:16 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08  7:16 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

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

failed to apply patch:
checking file lib/radix-tree.c
misordered hunks! output would be garbled
Hunk #2 FAILED at 581.
Hunk #3 succeeded at 1363 (offset -4 lines).
1 out of 3 hunks FAILED



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15fee232e80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231208055640.1895881-1-lizhi.xu@windriver.com>
@ 2023-12-08  6:15 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08  6:15 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

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

failed to apply patch:
checking file lib/radix-tree.c
misordered hunks! output would be garbled
Hunk #2 FAILED at 57.
1 out of 2 hunks FAILED



Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
compiler:       
patch:          https://syzkaller.appspot.com/x/patch.diff?x=149841cae80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
       [not found] <20231208041309.2699993-1-lizhi.xu@windriver.com>
@ 2023-12-08  5:17 ` syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08  5:17 UTC (permalink / raw)
  To: linux-kernel, lizhi.xu, syzkaller-bugs

Hello,

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

lib/radix-tree.c:718:17: error: implicit declaration of function '__radix_tree_delete'; did you mean 'radix_tree_delete'? [-Werror=implicit-function-declaration]
lib/radix-tree.c:1366:13: error: conflicting types for '__radix_tree_delete'; have 'bool(struct xarray *, struct xa_node *, void **)' {aka '_Bool(struct xarray *, struct xa_node *, void **)'}


Tested on:

commit:         33cc938e Linux 6.7-rc4
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=1472fe6ce80000


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2)
@ 2023-12-08  0:52 syzbot
  0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2023-12-08  0:52 UTC (permalink / raw)
  To: davem, edumazet, kuba, linux-arm-msm, linux-kernel, mani, netdev,
	pabeni, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    33cc938e65a9 Linux 6.7-rc4
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16ddf83ce80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=37d1b8bb20150e6
dashboard link: https://syzkaller.appspot.com/bug?extid=006987d1be3586e13555
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=10276ebae80000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=128c50d2e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bd6d7a5ff2af/disk-33cc938e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ce91b40ecddb/vmlinux-33cc938e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5507257fe99e/bzImage-33cc938e.xz

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

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
BUG: memory leak
unreferenced object 0xffff88810bbf56d8 (size 576):
  comm "syz-executor250", pid 5051, jiffies 4294951219 (age 12.920s)
  hex dump (first 32 bytes):
    3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  <...............
    f0 a9 2d 0c 81 88 ff ff f0 56 bf 0b 81 88 ff ff  ..-......V......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae105d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae105d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae26f6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32d2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c32>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c32>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d7b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810bbf5920 (size 576):
  comm "syz-executor250", pid 5051, jiffies 4294951219 (age 12.920s)
  hex dump (first 32 bytes):
    36 0f 01 00 00 00 00 00 d8 56 bf 0b 81 88 ff ff  6........V......
    f0 a9 2d 0c 81 88 ff ff 38 59 bf 0b 81 88 ff ff  ..-.....8Y......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae105d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae105d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae26f6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32d2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c32>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c32>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d7b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c832000 (size 576):
  comm "syz-executor250", pid 5051, jiffies 4294951219 (age 12.920s)
  hex dump (first 32 bytes):
    30 3f 01 00 00 00 00 00 20 59 bf 0b 81 88 ff ff  0?...... Y......
    f0 a9 2d 0c 81 88 ff ff 18 20 83 0c 81 88 ff ff  ..-...... ......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae105d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae105d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae26f6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32d2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c32>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c32>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d7b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff88810c832248 (size 576):
  comm "syz-executor250", pid 5051, jiffies 4294951219 (age 12.920s)
  hex dump (first 32 bytes):
    2a 3f 00 00 00 00 00 00 00 20 83 0c 81 88 ff ff  *?....... ......
    f0 a9 2d 0c 81 88 ff ff 60 22 83 0c 81 88 ff ff  ..-.....`"......
  backtrace:
    [<ffffffff81631398>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631398>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631398>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631398>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631398>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631398>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff84b5094c>] radix_tree_node_alloc.constprop.0+0x7c/0x1a0 lib/radix-tree.c:276
    [<ffffffff84b524cf>] __radix_tree_create lib/radix-tree.c:624 [inline]
    [<ffffffff84b524cf>] radix_tree_insert+0x14f/0x360 lib/radix-tree.c:712
    [<ffffffff84ae105d>] qrtr_tx_wait net/qrtr/af_qrtr.c:277 [inline]
    [<ffffffff84ae105d>] qrtr_node_enqueue+0x57d/0x630 net/qrtr/af_qrtr.c:348
    [<ffffffff84ae26f6>] qrtr_bcast_enqueue+0x66/0xd0 net/qrtr/af_qrtr.c:891
    [<ffffffff84ae32d2>] qrtr_sendmsg+0x232/0x450 net/qrtr/af_qrtr.c:992
    [<ffffffff83ec3c32>] sock_sendmsg_nosec net/socket.c:730 [inline]
    [<ffffffff83ec3c32>] __sock_sendmsg+0x52/0xa0 net/socket.c:745
    [<ffffffff83ec3d7b>] sock_write_iter+0xfb/0x180 net/socket.c:1158
    [<ffffffff816961a7>] call_write_iter include/linux/fs.h:2020 [inline]
    [<ffffffff816961a7>] new_sync_write fs/read_write.c:491 [inline]
    [<ffffffff816961a7>] vfs_write+0x327/0x590 fs/read_write.c:584
    [<ffffffff816966fb>] ksys_write+0x13b/0x170 fs/read_write.c:637
    [<ffffffff84b6ddcf>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b6ddcf>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory


---
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.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-12-11  5:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20231208074438.4102005-1-lizhi.xu@windriver.com>
2023-12-08  8:17 ` [syzbot] [arm-msm?] [net?] memory leak in radix_tree_insert (2) syzbot
     [not found] <20231211051540.1882463-1-lizhi.xu@windriver.com>
2023-12-11  5:52 ` syzbot
     [not found] <20231211042442.1442601-1-lizhi.xu@windriver.com>
2023-12-11  4:41 ` syzbot
     [not found] <tencent_5DCBB36DE37A697AA3A5A44C176557784605@qq.com>
2023-12-10  8:13 ` syzbot
     [not found] <tencent_F5872516BA75BB5A33CC9E661B2F4BB81B08@qq.com>
2023-12-10  6:30 ` syzbot
     [not found] <tencent_9CCF8C7BE26EA02CF16DE894A8E88EEDA60A@qq.com>
2023-12-10  5:39 ` syzbot
     [not found] <tencent_FDEC79DE6C3C2C356F409770E8F6EFC2CE0A@qq.com>
2023-12-10  4:48 ` syzbot
     [not found] <tencent_1571C9B12ED06EED4CAC67FD86C052FC4606@qq.com>
2023-12-10  4:08 ` syzbot
     [not found] <tencent_0E30CFAC0DE825820DBC923D5DE75DAF1907@qq.com>
2023-12-10  1:19 ` syzbot
     [not found] <tencent_140DE9120A5D895DEA192FCF900D9FA5F807@qq.com>
2023-12-09  7:10 ` syzbot
     [not found] <tencent_366443176A9766C6D8D36A8374896363B605@qq.com>
2023-12-09  7:05 ` syzbot
     [not found] <tencent_170675C9766F66183C77360A96A237AE4B09@qq.com>
2023-12-09  5:17 ` syzbot
     [not found] <20231208094538.2466543-1-lizhi.xu@windriver.com>
2023-12-08 10:59 ` syzbot
     [not found] <20231208065944.3611430-1-lizhi.xu@windriver.com>
2023-12-08  7:16 ` syzbot
     [not found] <20231208055640.1895881-1-lizhi.xu@windriver.com>
2023-12-08  6:15 ` syzbot
     [not found] <20231208041309.2699993-1-lizhi.xu@windriver.com>
2023-12-08  5:17 ` syzbot
2023-12-08  0:52 syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.