Re: WARNING in binder_send_failed_reply

From: Eric Biggers
Date: Sun Apr 08 2018 - 18:40:14 EST


On Tue, Dec 26, 2017 at 02:20:01PM -0800, syzbot wrote:
> syzkaller has found reproducer for the following crash on
> 0e08c463db387a2adcb0243b15ab868a73f87807
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
> C reproducer is attached
> syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> for information about syzkaller reproducers
>
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by:
> <syzbot+a4a91202715b834181f106c1ad79f2f6fc35e102@xxxxxxxxxxxxxxxxxxxxxxxxx>
> It will help syzbot understand when the bug is fixed.
>
> binder: undelivered TRANSACTION_COMPLETE
> binder: undelivered TRANSACTION_ERROR: 29189
> binder: send failed reply for transaction 844 to 4059:4061
> ------------[ cut here ]------------
> Unexpected reply error: 29189
> WARNING: CPU: 0 PID: 1409 at drivers/android/binder.c:1998
> binder_send_failed_reply+0x13b/0x390 drivers/android/binder.c:1997
> Kernel panic - not syncing: panic_on_warn set ...
>
> CPU: 0 PID: 1409 Comm: kworker/0:2 Not tainted 4.15.0-rc4-next-20171221+ #78
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> Workqueue: events binder_deferred_func
> Call Trace:
> __dump_stack lib/dump_stack.c:17 [inline]
> dump_stack+0x194/0x257 lib/dump_stack.c:53
> panic+0x1e4/0x41c kernel/panic.c:183
> __warn+0x1dc/0x200 kernel/panic.c:547
> report_bug+0x211/0x2d0 lib/bug.c:184
> fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:177
> fixup_bug arch/x86/kernel/traps.c:246 [inline]
> do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:295
> do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
> invalid_op+0x22/0x40 arch/x86/entry/entry_64.S:1079
> RIP: 0010:binder_send_failed_reply+0x13b/0x390 drivers/android/binder.c:1997
> RSP: 0018:ffff8801d3887128 EFLAGS: 00010286
> RAX: dffffc0000000008 RBX: ffff8801c2fbce00 RCX: ffffffff8159f9ce
> RDX: 0000000000000000 RSI: 1ffff1003a70c91d RDI: 0000000000000293
> RBP: ffff8801d3887150 R08: 1ffff1003a710db8 R09: 0000000000000000
> R10: ffff8801d3886fa0 R11: 0000000000000000 R12: ffff8801bf73a840
> R13: 0000000000007205 R14: 0000000000007205 R15: 0000000000000fdb
> binder_cleanup_transaction+0xd2/0x140 drivers/android/binder.c:2035
> binder_release_work+0x340/0x490 drivers/android/binder.c:4198
> binder_deferred_release drivers/android/binder.c:4951 [inline]
> binder_deferred_func+0xe42/0x1340 drivers/android/binder.c:4996
> process_one_work+0xbbf/0x1af0 kernel/workqueue.c:2112
> worker_thread+0x223/0x1990 kernel/workqueue.c:2246
> kthread+0x33c/0x400 kernel/kthread.c:238
> ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:524
> Dumping ftrace buffer:
> (ftrace buffer empty)
> Kernel Offset: disabled
> Rebooting in 86400 seconds..
>

syzbot is no longer hitting this because the WARN() was removed by commit
e46a3b3ba7509c:

#syz fix: ANDROID: binder: remove WARN() for redundant txn error

- Eric