All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] memory leak in binder_transaction (2)
@ 2022-11-20 21:51 syzbot
  2023-09-11 20:56 ` [syzbot] [kernel?] " syzbot
  2023-09-22  4:42 ` [PATCH] binder: fix memory leak of spamming work Carlos Llamas
  0 siblings, 2 replies; 6+ messages in thread
From: syzbot @ 2022-11-20 21:51 UTC (permalink / raw)
  To: arve, brauner, cmllamas, gregkh, joel, linux-kernel, maco,
	surenb, syzkaller-bugs, tkjos

Hello,

syzbot found the following issue on:

HEAD commit:    59d0d52c30d4 AMerge tag 'netfs-fixes-20221115' of git://gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14a7b445880000
kernel config:  https://syzkaller.appspot.com/x/.config?x=435fb8cdd395f932
dashboard link: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=114a3b35880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/854c98a663e0/disk-59d0d52c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/233c8e05ab54/vmlinux-59d0d52c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7254f9286f1d/bzImage-59d0d52c.xz

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

BUG: memory leak
unreferenced object 0xffff88811b0bbe00 (size 32):
  comm "syz-executor.1", pid 4041, jiffies 4294986632 (age 15.340s)
  hex dump (first 32 bytes):
    00 be 0b 1b 81 88 ff ff 00 be 0b 1b 81 88 ff ff  ................
    03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814ed530>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045
    [<ffffffff8396b973>] kmalloc include/linux/slab.h:553 [inline]
    [<ffffffff8396b973>] kzalloc include/linux/slab.h:689 [inline]
    [<ffffffff8396b973>] binder_transaction+0xc53/0x3f20 drivers/android/binder.c:3128
    [<ffffffff8396f213>] binder_thread_write+0x5d3/0x1790 drivers/android/binder.c:3975
    [<ffffffff839726cb>] binder_ioctl_write_read drivers/android/binder.c:5034 [inline]
    [<ffffffff839726cb>] binder_ioctl+0x22fb/0x3a30 drivers/android/binder.c:5321
    [<ffffffff8161f20c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff8161f20c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff8161f20c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff8161f20c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff848802d5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff848802d5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84a00087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd



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

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

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

* Re: [syzbot] [kernel?] memory leak in binder_transaction (2)
  2022-11-20 21:51 [syzbot] memory leak in binder_transaction (2) syzbot
@ 2023-09-11 20:56 ` syzbot
  2023-09-22  4:42 ` [PATCH] binder: fix memory leak of spamming work Carlos Llamas
  1 sibling, 0 replies; 6+ messages in thread
From: syzbot @ 2023-09-11 20:56 UTC (permalink / raw)
  To: arve, brauner, cmllamas, gregkh, hdanton, joel, linux-kernel,
	maco, surenb, syzkaller-bugs, tkjos

syzbot has found a reproducer for the following issue on:

HEAD commit:    0bb80ecc33a8 Linux 6.6-rc1
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=177ee3c8680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=99ce3535087fc27
dashboard link: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
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=107b832c680000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=147332b4680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ce21ae500663/disk-0bb80ecc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1d2f34908198/vmlinux-0bb80ecc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9c6f5eecda20/bzImage-0bb80ecc.xz

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

BUG: memory leak
unreferenced object 0xffff88810e2d6de0 (size 32):
  comm "syz-executor338", pid 5046, jiffies 4294968230 (age 13.590s)
  hex dump (first 32 bytes):
    e0 6d 2d 0e 81 88 ff ff e0 6d 2d 0e 81 88 ff ff  .m-......m-.....
    04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81573b75>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1114
    [<ffffffff83d41873>] kmalloc include/linux/slab.h:599 [inline]
    [<ffffffff83d41873>] kzalloc include/linux/slab.h:720 [inline]
    [<ffffffff83d41873>] binder_transaction+0x573/0x4050 drivers/android/binder.c:3152
    [<ffffffff83d45a05>] binder_thread_write+0x6b5/0x1860 drivers/android/binder.c:4010
    [<ffffffff83d486dc>] binder_ioctl_write_read drivers/android/binder.c:5066 [inline]
    [<ffffffff83d486dc>] binder_ioctl+0x1b2c/0x3cf0 drivers/android/binder.c:5352
    [<ffffffff816b25f2>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816b25f2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816b25f2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816b25f2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b30008>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84b30008>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

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


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

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

* [PATCH] binder: fix memory leak of spamming work
  2022-11-20 21:51 [syzbot] memory leak in binder_transaction (2) syzbot
  2023-09-11 20:56 ` [syzbot] [kernel?] " syzbot
@ 2023-09-22  4:42 ` Carlos Llamas
  2023-09-22 17:51   ` [PATCH v2] binder: fix memory leaks of spam and pending work Carlos Llamas
  1 sibling, 1 reply; 6+ messages in thread
From: Carlos Llamas @ 2023-09-22  4:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
	Suren Baghdasaryan, Hang Lu
  Cc: linux-kernel, kernel-team, syzkaller-bugs, stable,
	syzbot+7f10c1653e35933c0f1e, Todd Kjos

A transaction complete work is allocated and queued for each
transaction. Under certain conditions the work->type might be marked as
BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT to notify userspace about
potential spamming threads.

However, this work->type is not being handled in binder_release_work()
so it will leak during a clean up. This was reported by syzkaller with
the following kmemleak dump:

BUG: memory leak
unreferenced object 0xffff88810e2d6de0 (size 32):
  comm "syz-executor338", pid 5046, jiffies 4294968230 (age 13.590s)
  hex dump (first 32 bytes):
    e0 6d 2d 0e 81 88 ff ff e0 6d 2d 0e 81 88 ff ff  .m-......m-.....
    04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81573b75>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1114
    [<ffffffff83d41873>] kmalloc include/linux/slab.h:599 [inline]
    [<ffffffff83d41873>] kzalloc include/linux/slab.h:720 [inline]
    [<ffffffff83d41873>] binder_transaction+0x573/0x4050 drivers/android/binder.c:3152
    [<ffffffff83d45a05>] binder_thread_write+0x6b5/0x1860 drivers/android/binder.c:4010
    [<ffffffff83d486dc>] binder_ioctl_write_read drivers/android/binder.c:5066 [inline]
    [<ffffffff83d486dc>] binder_ioctl+0x1b2c/0x3cf0 drivers/android/binder.c:5352
    [<ffffffff816b25f2>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816b25f2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816b25f2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816b25f2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b30008>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84b30008>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

Fix the leak by kfreeing this work in binder_release_work().

Cc: stable@vger.kernel.org
Fixes: a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
Reported-by: syzbot+7f10c1653e35933c0f1e@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
---
 drivers/android/binder.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 367afac5f1bf..d7aa561f4ef2 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4831,6 +4831,9 @@ static void binder_release_work(struct binder_proc *proc,
 		} break;
 		case BINDER_WORK_NODE:
 			break;
+		case BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT:
+			kfree(w);
+			break;
 		default:
 			pr_err("unexpected work type, %d, not freed\n",
 			       wtype);
-- 
2.42.0.515.g380fc7ccd1-goog


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

* [PATCH v2] binder: fix memory leaks of spam and pending work
  2023-09-22  4:42 ` [PATCH] binder: fix memory leak of spamming work Carlos Llamas
@ 2023-09-22 17:51   ` Carlos Llamas
  2023-09-22 18:50     ` Alice Ryhl
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Llamas @ 2023-09-22 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
	Suren Baghdasaryan, Li Li, Hang Lu
  Cc: linux-kernel, kernel-team, syzkaller-bugs, stable,
	syzbot+7f10c1653e35933c0f1e, Alice Ryhl, Todd Kjos

A transaction complete work is allocated and queued for each
transaction. Under certain conditions the work->type might be marked as
BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT to notify userspace about
potential spamming threads or as BINDER_WORK_TRANSACTION_PENDING when
the target is currently frozen.

However, these work types are not being handled in binder_release_work()
so they will leak during a cleanup. This was reported by syzkaller with
the following kmemleak dump:

BUG: memory leak
unreferenced object 0xffff88810e2d6de0 (size 32):
  comm "syz-executor338", pid 5046, jiffies 4294968230 (age 13.590s)
  hex dump (first 32 bytes):
    e0 6d 2d 0e 81 88 ff ff e0 6d 2d 0e 81 88 ff ff  .m-......m-.....
    04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81573b75>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1114
    [<ffffffff83d41873>] kmalloc include/linux/slab.h:599 [inline]
    [<ffffffff83d41873>] kzalloc include/linux/slab.h:720 [inline]
    [<ffffffff83d41873>] binder_transaction+0x573/0x4050 drivers/android/binder.c:3152
    [<ffffffff83d45a05>] binder_thread_write+0x6b5/0x1860 drivers/android/binder.c:4010
    [<ffffffff83d486dc>] binder_ioctl_write_read drivers/android/binder.c:5066 [inline]
    [<ffffffff83d486dc>] binder_ioctl+0x1b2c/0x3cf0 drivers/android/binder.c:5352
    [<ffffffff816b25f2>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816b25f2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816b25f2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816b25f2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b30008>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84b30008>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

Fix the leaks by kfreeing these work types in binder_release_work() and
handle them as a BINDER_WORK_TRANSACTION_COMPLETE cleanup.

Cc: stable@vger.kernel.org
Fixes: 0567461a7a6e ("binder: return pending info for frozen async txns")
Fixes: a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
Reported-by: syzbot+7f10c1653e35933c0f1e@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
---
v2 - Handle also peding work and merge with transaction complete as
     suggested by Alice Ryhl. Add corresponding new tags.
v1 - https://lore.kernel.org/all/20230922044241.322832-1-cmllamas@google.com/
---
 drivers/android/binder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 367afac5f1bf..92128aae2d06 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4812,6 +4812,8 @@ static void binder_release_work(struct binder_proc *proc,
 				"undelivered TRANSACTION_ERROR: %u\n",
 				e->cmd);
 		} break;
+		case BINDER_WORK_TRANSACTION_PENDING:
+		case BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT:
 		case BINDER_WORK_TRANSACTION_COMPLETE: {
 			binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
 				"undelivered TRANSACTION_COMPLETE\n");
-- 
2.42.0.515.g380fc7ccd1-goog


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

* Re: [PATCH v2] binder: fix memory leaks of spam and pending work
  2023-09-22 17:51   ` [PATCH v2] binder: fix memory leaks of spam and pending work Carlos Llamas
@ 2023-09-22 18:50     ` Alice Ryhl
  2023-09-25 18:46       ` Todd Kjos
  0 siblings, 1 reply; 6+ messages in thread
From: Alice Ryhl @ 2023-09-22 18:50 UTC (permalink / raw)
  To: Carlos Llamas
  Cc: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Suren Baghdasaryan, Li Li, Hang Lu, linux-kernel, kernel-team,
	syzkaller-bugs, stable, syzbot+7f10c1653e35933c0f1e, Todd Kjos

On Fri, Sep 22, 2023 at 7:51 PM Carlos Llamas <cmllamas@google.com> wrote:
>
> A transaction complete work is allocated and queued for each
> transaction. Under certain conditions the work->type might be marked as
> BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT to notify userspace about
> potential spamming threads or as BINDER_WORK_TRANSACTION_PENDING when
> the target is currently frozen.
>
> However, these work types are not being handled in binder_release_work()
> so they will leak during a cleanup. This was reported by syzkaller with
> the following kmemleak dump:
>
> BUG: memory leak
> unreferenced object 0xffff88810e2d6de0 (size 32):
>   comm "syz-executor338", pid 5046, jiffies 4294968230 (age 13.590s)
>   hex dump (first 32 bytes):
>     e0 6d 2d 0e 81 88 ff ff e0 6d 2d 0e 81 88 ff ff  .m-......m-.....
>     04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>   backtrace:
>     [<ffffffff81573b75>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1114
>     [<ffffffff83d41873>] kmalloc include/linux/slab.h:599 [inline]
>     [<ffffffff83d41873>] kzalloc include/linux/slab.h:720 [inline]
>     [<ffffffff83d41873>] binder_transaction+0x573/0x4050 drivers/android/binder.c:3152
>     [<ffffffff83d45a05>] binder_thread_write+0x6b5/0x1860 drivers/android/binder.c:4010
>     [<ffffffff83d486dc>] binder_ioctl_write_read drivers/android/binder.c:5066 [inline]
>     [<ffffffff83d486dc>] binder_ioctl+0x1b2c/0x3cf0 drivers/android/binder.c:5352
>     [<ffffffff816b25f2>] vfs_ioctl fs/ioctl.c:51 [inline]
>     [<ffffffff816b25f2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
>     [<ffffffff816b25f2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
>     [<ffffffff816b25f2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
>     [<ffffffff84b30008>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
>     [<ffffffff84b30008>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
>     [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
>
> Fix the leaks by kfreeing these work types in binder_release_work() and
> handle them as a BINDER_WORK_TRANSACTION_COMPLETE cleanup.
>
> Cc: stable@vger.kernel.org
> Fixes: 0567461a7a6e ("binder: return pending info for frozen async txns")
> Fixes: a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
> Reported-by: syzbot+7f10c1653e35933c0f1e@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
> Suggested-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Carlos Llamas <cmllamas@google.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

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

* Re: [PATCH v2] binder: fix memory leaks of spam and pending work
  2023-09-22 18:50     ` Alice Ryhl
@ 2023-09-25 18:46       ` Todd Kjos
  0 siblings, 0 replies; 6+ messages in thread
From: Todd Kjos @ 2023-09-25 18:46 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: Carlos Llamas, Greg Kroah-Hartman, Arve Hjønnevåg,
	Todd Kjos, Martijn Coenen, Joel Fernandes, Christian Brauner,
	Suren Baghdasaryan, Li Li, Hang Lu, linux-kernel, kernel-team,
	syzkaller-bugs, stable, syzbot+7f10c1653e35933c0f1e

On Fri, Sep 22, 2023 at 11:51 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> On Fri, Sep 22, 2023 at 7:51 PM Carlos Llamas <cmllamas@google.com> wrote:
> >
> > A transaction complete work is allocated and queued for each
> > transaction. Under certain conditions the work->type might be marked as
> > BINDER_WORK_TRANSACTION_ONEWAY_SPAM_SUSPECT to notify userspace about
> > potential spamming threads or as BINDER_WORK_TRANSACTION_PENDING when
> > the target is currently frozen.
> >
> > However, these work types are not being handled in binder_release_work()
> > so they will leak during a cleanup. This was reported by syzkaller with
> > the following kmemleak dump:
> >
> > BUG: memory leak
> > unreferenced object 0xffff88810e2d6de0 (size 32):
> >   comm "syz-executor338", pid 5046, jiffies 4294968230 (age 13.590s)
> >   hex dump (first 32 bytes):
> >     e0 6d 2d 0e 81 88 ff ff e0 6d 2d 0e 81 88 ff ff  .m-......m-.....
> >     04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> >   backtrace:
> >     [<ffffffff81573b75>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1114
> >     [<ffffffff83d41873>] kmalloc include/linux/slab.h:599 [inline]
> >     [<ffffffff83d41873>] kzalloc include/linux/slab.h:720 [inline]
> >     [<ffffffff83d41873>] binder_transaction+0x573/0x4050 drivers/android/binder.c:3152
> >     [<ffffffff83d45a05>] binder_thread_write+0x6b5/0x1860 drivers/android/binder.c:4010
> >     [<ffffffff83d486dc>] binder_ioctl_write_read drivers/android/binder.c:5066 [inline]
> >     [<ffffffff83d486dc>] binder_ioctl+0x1b2c/0x3cf0 drivers/android/binder.c:5352
> >     [<ffffffff816b25f2>] vfs_ioctl fs/ioctl.c:51 [inline]
> >     [<ffffffff816b25f2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
> >     [<ffffffff816b25f2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
> >     [<ffffffff816b25f2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
> >     [<ffffffff84b30008>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> >     [<ffffffff84b30008>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
> >     [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
> >
> > Fix the leaks by kfreeing these work types in binder_release_work() and
> > handle them as a BINDER_WORK_TRANSACTION_COMPLETE cleanup.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: 0567461a7a6e ("binder: return pending info for frozen async txns")
> > Fixes: a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming")
> > Reported-by: syzbot+7f10c1653e35933c0f1e@syzkaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=7f10c1653e35933c0f1e
> > Suggested-by: Alice Ryhl <aliceryhl@google.com>
> > Signed-off-by: Carlos Llamas <cmllamas@google.com>
>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>

Acked-by: Todd Kjos <tkjos@google.com>

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

end of thread, other threads:[~2023-09-25 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 21:51 [syzbot] memory leak in binder_transaction (2) syzbot
2023-09-11 20:56 ` [syzbot] [kernel?] " syzbot
2023-09-22  4:42 ` [PATCH] binder: fix memory leak of spamming work Carlos Llamas
2023-09-22 17:51   ` [PATCH v2] binder: fix memory leaks of spam and pending work Carlos Llamas
2023-09-22 18:50     ` Alice Ryhl
2023-09-25 18:46       ` Todd Kjos

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.