Re: general protection fault in percpu_ref_exit
On Thu, Oct 08, 2020 at 07:23:02PM -0600, Jens Axboe wrote: > On 10/8/20 2:28 PM, syzbot wrote: > > syzbot has bisected this issue to: > > > > commit 2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e > > Author: Ming Lei > > Date: Thu Oct 1 15:48:41 2020 + > > > > percpu_ref: reduce memory footprint of percpu_ref in fast path > > > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=126930d050 > > start commit: 8b787da7 Add linux-next specific files for 20201007 > > git tree: linux-next > > final oops: https://syzkaller.appspot.com/x/report.txt?x=116930d050 > > console output: https://syzkaller.appspot.com/x/log.txt?x=166930d050 > > kernel config: https://syzkaller.appspot.com/x/.config?x=aac055e9c8fbd2b8 > > dashboard link: https://syzkaller.appspot.com/bug?extid=fd15ff734dace9e16437 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119a056850 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=106c0a8b90 > > > > Reported-by: syzbot+fd15ff734dace9e16...@syzkaller.appspotmail.com > > Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in > > fast path") > > > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection > > Ming, this looks like a call of percpu_ref_exit() on a zeroed refs (that > hasn't been initialized). Really a caller error imho, but might make sense > to be a bit safer there. Hello Jens, The fix is sent out as: https://lore.kernel.org/linux-block/20201009040356.43802-1-ming@redhat.com/T/#u Sorry for making the trouble. Thanks, Ming
Re: general protection fault in percpu_ref_exit
On 10/8/20 2:28 PM, syzbot wrote: > syzbot has bisected this issue to: > > commit 2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e > Author: Ming Lei > Date: Thu Oct 1 15:48:41 2020 + > > percpu_ref: reduce memory footprint of percpu_ref in fast path > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=126930d050 > start commit: 8b787da7 Add linux-next specific files for 20201007 > git tree: linux-next > final oops: https://syzkaller.appspot.com/x/report.txt?x=116930d050 > console output: https://syzkaller.appspot.com/x/log.txt?x=166930d050 > kernel config: https://syzkaller.appspot.com/x/.config?x=aac055e9c8fbd2b8 > dashboard link: https://syzkaller.appspot.com/bug?extid=fd15ff734dace9e16437 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119a056850 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=106c0a8b90 > > Reported-by: syzbot+fd15ff734dace9e16...@syzkaller.appspotmail.com > Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in > fast path") > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection Ming, this looks like a call of percpu_ref_exit() on a zeroed refs (that hasn't been initialized). Really a caller error imho, but might make sense to be a bit safer there. -- Jens Axboe
Re: general protection fault in percpu_ref_exit
syzbot has bisected this issue to: commit 2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e Author: Ming Lei Date: Thu Oct 1 15:48:41 2020 + percpu_ref: reduce memory footprint of percpu_ref in fast path bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=126930d050 start commit: 8b787da7 Add linux-next specific files for 20201007 git tree: linux-next final oops: https://syzkaller.appspot.com/x/report.txt?x=116930d050 console output: https://syzkaller.appspot.com/x/log.txt?x=166930d050 kernel config: https://syzkaller.appspot.com/x/.config?x=aac055e9c8fbd2b8 dashboard link: https://syzkaller.appspot.com/bug?extid=fd15ff734dace9e16437 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119a056850 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=106c0a8b90 Reported-by: syzbot+fd15ff734dace9e16...@syzkaller.appspotmail.com Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in fast path") For information about bisection process see: https://goo.gl/tpsmEJ#bisection
general protection fault in percpu_ref_exit
Hello, syzbot found the following issue on: HEAD commit:8b787da7 Add linux-next specific files for 20201007 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=15b6734f90 kernel config: https://syzkaller.appspot.com/x/.config?x=aac055e9c8fbd2b8 dashboard link: https://syzkaller.appspot.com/bug?extid=fd15ff734dace9e16437 compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119a056850 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=106c0a8b90 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+fd15ff734dace9e16...@syzkaller.appspotmail.com RDX: 0001 RSI: 2140 RDI: f501 RBP: 006dbc20 R08: 0001 R09: R10: R11: 0246 R12: 006dbc2c R13: 7ffe36a84a0f R14: 7f51c77e59c0 R15: general protection fault, probably for non-canonical address 0xdc02: [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0010-0x0017] CPU: 1 PID: 6924 Comm: syz-executor821 Not tainted 5.9.0-rc8-next-20201007-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__percpu_ref_exit lib/percpu-refcount.c:112 [inline] RIP: 0010:percpu_ref_exit+0x7f/0x210 lib/percpu-refcount.c:133 Code: e5 fc 48 89 ee e8 01 42 b9 fd 48 85 ed 74 60 e8 77 45 b9 fd 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 26 01 00 00 49 83 7c 24 10 00 0f 85 01 01 00 00 RSP: 0018:c900054b7de0 EFLAGS: 00010202 RAX: dc00 RBX: 88802feb1658 RCX: 83bc130f RDX: 0002 RSI: 83bc1319 RDI: 0010 RBP: 607f51875180 R08: 0001 R09: 88802feb1807 R10: R11: R12: R13: 88802feb1660 R14: 88802feb1800 R15: 88802feb1670 FS: 7f51c77e5700() GS:8880ae50() knlGS: CS: 0010 DS: ES: CR0: 80050033 CR2: 2140 CR3: 12424000 CR4: 001506e0 DR0: DR1: DR2: DR3: DR6: fffe0ff0 DR7: 0400 Call Trace: ioctx_alloc+0x2d2/0x1d60 fs/aio.c:804 __do_sys_io_setup fs/aio.c:1326 [inline] __se_sys_io_setup fs/aio.c:1309 [inline] __x64_sys_io_setup+0xe9/0x230 fs/aio.c:1309 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x446769 Code: e8 bc b5 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 ab 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:7f51c77e4db8 EFLAGS: 0246 ORIG_RAX: 00ce RAX: ffda RBX: 006dbc28 RCX: 00446769 RDX: 0001 RSI: 2140 RDI: f501 RBP: 006dbc20 R08: 0001 R09: R10: R11: 0246 R12: 006dbc2c R13: 7ffe36a84a0f R14: 7f51c77e59c0 R15: Modules linked in: ---[ end trace 000c19ea8a5922ba ]--- RIP: 0010:__percpu_ref_exit lib/percpu-refcount.c:112 [inline] RIP: 0010:percpu_ref_exit+0x7f/0x210 lib/percpu-refcount.c:133 Code: e5 fc 48 89 ee e8 01 42 b9 fd 48 85 ed 74 60 e8 77 45 b9 fd 49 8d 7c 24 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 26 01 00 00 49 83 7c 24 10 00 0f 85 01 01 00 00 RSP: 0018:c900054b7de0 EFLAGS: 00010202 RAX: dc00 RBX: 88802feb1658 RCX: 83bc130f RDX: 0002 RSI: 83bc1319 RDI: 0010 RBP: 607f51875180 R08: 0001 R09: 88802feb1807 R10: R11: R12: R13: 88802feb1660 R14: 88802feb1800 R15: 88802feb1670 FS: 7f51c77e5700() GS:8880ae50() knlGS: CS: 0010 DS: ES: CR0: 80050033 CR2: 2140 CR3: 12424000 CR4: 001506e0 DR0: DR1: DR2: DR3: DR6: fffe0ff0 DR7: 0400 --- 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 syzkal...@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