public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
@ 2024-10-28 16:33 syzbot
  2024-10-29 11:20 ` Hillf Danton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2024-10-28 16:33 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:    c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16a6324b980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=a34ca8ca33c0e535
dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
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=1484165f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132b2ebb980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/05e1e9a9e3e9/disk-c2ee9f59.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c9ad3be6c91b/vmlinux-c2ee9f59.xz
kernel image: https://storage.googleapis.com/syzbot-assets/737d48c357b7/bzImage-c2ee9f59.xz

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

------------[ cut here ]------------
kernel BUG at drivers/android/binder_alloc.c:897!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.12.0-rc4-syzkaller-00047-gc2ee9f594da8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events binder_deferred_func
RIP: 0010:binder_alloc_deferred_release+0x68c/0x820 drivers/android/binder_alloc.c:897
Code: 00 00 00 48 c7 c6 20 7f 8d 8c 48 c7 c7 e0 7c 8d 8c 44 8b 44 24 14 8b 4c 24 10 e8 ef fd bb f8 e9 56 ff ff ff e8 d5 4b dc f8 90 <0f> 0b e8 cd 4b dc f8 48 89 ef e8 05 46 9c f8 e9 21 ff ff ff e8 ab
RSP: 0018:ffffc900000e7b98 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880415e3220 RCX: ffffffff816b1a6d
RDX: ffff88801d6c0000 RSI: ffffffff88b1332b RDI: ffff8880415e3260
RBP: 0000000000000003 R08: 0000000000000001 R09: fffff5200001cf65
R10: 0000000000000003 R11: 0000000000000000 R12: ffff8880335c1860
R13: ffff8880335c1910 R14: ffff8880415e32c8 R15: ffff8880415e3000
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f005c851546 CR3: 0000000079838000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 binder_free_proc drivers/android/binder.c:5237 [inline]
 binder_proc_dec_tmpref drivers/android/binder.c:1559 [inline]
 binder_proc_dec_tmpref+0x291/0x590 drivers/android/binder.c:1552
 binder_deferred_release drivers/android/binder.c:6269 [inline]
 binder_deferred_func+0xeda/0x12e0 drivers/android/binder.c:6296
 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229
 process_scheduled_works kernel/workqueue.c:3310 [inline]
 worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
 kthread+0x2c1/0x3a0 kernel/kthread.c:389
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:binder_alloc_deferred_release+0x68c/0x820 drivers/android/binder_alloc.c:897
Code: 00 00 00 48 c7 c6 20 7f 8d 8c 48 c7 c7 e0 7c 8d 8c 44 8b 44 24 14 8b 4c 24 10 e8 ef fd bb f8 e9 56 ff ff ff e8 d5 4b dc f8 90 <0f> 0b e8 cd 4b dc f8 48 89 ef e8 05 46 9c f8 e9 21 ff ff ff e8 ab
RSP: 0018:ffffc900000e7b98 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880415e3220 RCX: ffffffff816b1a6d
RDX: ffff88801d6c0000 RSI: ffffffff88b1332b RDI: ffff8880415e3260
RBP: 0000000000000003 R08: 0000000000000001 R09: fffff5200001cf65
R10: 0000000000000003 R11: 0000000000000000 R12: ffff8880335c1860
R13: ffff8880335c1910 R14: ffff8880415e32c8 R15: ffff8880415e3000
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f005c851546 CR3: 000000000df7c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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] 7+ messages in thread

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-10-28 16:33 [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2) syzbot
@ 2024-10-29 11:20 ` Hillf Danton
  2024-10-29 12:01   ` syzbot
  2024-11-04 16:21 ` syzbot
  2024-12-13  1:55 ` syzbot
  2 siblings, 1 reply; 7+ messages in thread
From: Hillf Danton @ 2024-10-29 11:20 UTC (permalink / raw)
  To: syzbot; +Cc: linux-kernel, syzkaller-bugs

On Mon, 28 Oct 2024 09:33:26 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
> git tree:       upstream
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132b2ebb980000

#syz test

--- x/drivers/android/binder.c
+++ y/drivers/android/binder.c
@@ -6307,6 +6307,7 @@ binder_defer_work(struct binder_proc *pr
 		hlist_add_head(&proc->deferred_work_node,
 				&binder_deferred_list);
 		schedule_work(&binder_deferred_work);
+		binder_alloc_vma_close(&proc->alloc);
 	}
 	mutex_unlock(&binder_deferred_lock);
 }
--

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

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-10-29 11:20 ` Hillf Danton
@ 2024-10-29 12:01   ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-10-29 12:01 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

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

Reported-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com
Tested-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com

Tested on:

commit:         e42b1a9a Merge tag 'spi-fix-v6.12-rc5' of git://git.ke..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12784540580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4340261e4e9f37fc
dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
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=14904540580000

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

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

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-10-28 16:33 [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2) syzbot
  2024-10-29 11:20 ` Hillf Danton
@ 2024-11-04 16:21 ` syzbot
  2024-11-04 16:26   ` Liam R. Howlett
  2024-12-13  1:55 ` syzbot
  2 siblings, 1 reply; 7+ messages in thread
From: syzbot @ 2024-11-04 16:21 UTC (permalink / raw)
  To: Liam.Howlett, akpm, arve, brauner, cmllamas, gregkh, hdanton,
	joel, liam.howlett, linux-kernel, lorenzo.stoakes, maco, surenb,
	syzkaller-bugs, tkjos

syzbot has bisected this issue to:

commit f8d112a4e657c65c888e6b8a8435ef61a66e4ab8
Author: Liam R. Howlett <Liam.Howlett@Oracle.com>
Date:   Fri Aug 30 04:00:54 2024 +0000

    mm/mmap: avoid zeroing vma tree in mmap_region()

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=11fc46a7980000
start commit:   c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=13fc46a7980000
console output: https://syzkaller.appspot.com/x/log.txt?x=15fc46a7980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=a34ca8ca33c0e535
dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1484165f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132b2ebb980000

Reported-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com
Fixes: f8d112a4e657 ("mm/mmap: avoid zeroing vma tree in mmap_region()")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

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

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-11-04 16:21 ` syzbot
@ 2024-11-04 16:26   ` Liam R. Howlett
  2024-11-04 17:32     ` syzbot
  0 siblings, 1 reply; 7+ messages in thread
From: Liam R. Howlett @ 2024-11-04 16:26 UTC (permalink / raw)
  To: syzbot
  Cc: akpm, arve, brauner, cmllamas, gregkh, hdanton, joel,
	linux-kernel, lorenzo.stoakes, maco, surenb, syzkaller-bugs,
	tkjos

* syzbot <syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com> [241104 11:21]:
> syzbot has bisected this issue to:
> 
> commit f8d112a4e657c65c888e6b8a8435ef61a66e4ab8
> Author: Liam R. Howlett <Liam.Howlett@Oracle.com>
> Date:   Fri Aug 30 04:00:54 2024 +0000
> 
>     mm/mmap: avoid zeroing vma tree in mmap_region()
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=11fc46a7980000
> start commit:   c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
> git tree:       upstream
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=13fc46a7980000
> console output: https://syzkaller.appspot.com/x/log.txt?x=15fc46a7980000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=a34ca8ca33c0e535
> dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1484165f980000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132b2ebb980000
> 
> Reported-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com
> Fixes: f8d112a4e657 ("mm/mmap: avoid zeroing vma tree in mmap_region()")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Let's get this out of the way..

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/ mm-hotfixes-unstable


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

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-11-04 16:26   ` Liam R. Howlett
@ 2024-11-04 17:32     ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-11-04 17:32 UTC (permalink / raw)
  To: akpm, arve, brauner, cmllamas, gregkh, hdanton, joel,
	liam.howlett, linux-kernel, lorenzo.stoakes, maco, surenb,
	syzkaller-bugs, tkjos

Hello,

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

Reported-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com
Tested-by: syzbot+dee8aa54cb2f5a150f9e@syzkaller.appspotmail.com

Tested on:

commit:         0012ab09 fs/proc: fix compile warning about variable '..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/ mm-hotfixes-unstable
console output: https://syzkaller.appspot.com/x/log.txt?x=11a42740580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4340261e4e9f37fc
dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

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

* Re: [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2)
  2024-10-28 16:33 [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2) syzbot
  2024-10-29 11:20 ` Hillf Danton
  2024-11-04 16:21 ` syzbot
@ 2024-12-13  1:55 ` syzbot
  2 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-12-13  1:55 UTC (permalink / raw)
  To: akpm, arve, brauner, cmllamas, gregkh, hdanton, jannh, joel,
	liam.howlett, linux-kernel, lorenzo.stoakes, maco, surenb,
	syzkaller-bugs, tkjos, vbabka

syzbot suspects this issue was fixed by commit:

commit 4080ef1579b2413435413988d14ac8c68e4d42c8
Author: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Date:   Tue Oct 29 18:11:45 2024 +0000

    mm: unconditionally close VMAs on error

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=1329cd44580000
start commit:   c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=a34ca8ca33c0e535
dashboard link: https://syzkaller.appspot.com/bug?extid=dee8aa54cb2f5a150f9e
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1484165f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=132b2ebb980000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: mm: unconditionally close VMAs on error

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

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

end of thread, other threads:[~2024-12-13  1:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 16:33 [syzbot] [kernel?] kernel BUG in binder_alloc_deferred_release (2) syzbot
2024-10-29 11:20 ` Hillf Danton
2024-10-29 12:01   ` syzbot
2024-11-04 16:21 ` syzbot
2024-11-04 16:26   ` Liam R. Howlett
2024-11-04 17:32     ` syzbot
2024-12-13  1:55 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox