general protection fault in padata_reorder

6 views
Skip to first unread message

syzbot

unread,
Feb 11, 2020, 10:35:11 AM2/11/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 35766839 Linux 4.19.103
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=147bdf85e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=84f14e7b6cbc7d27
dashboard link: https://syzkaller.appspot.com/bug?extid=927d15dee5db4725c2ea
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

audit: type=1400 audit(1581435267.712:40): avc: denied { prog_run } for pid=8435 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: pencrypt padata_parallel_worker
RIP: 0010:padata_reorder+0x303/0x740 kernel/padata.c:263
Code: 00 0f 85 7f 03 00 00 4c 89 21 e8 88 21 e7 ff 4c 89 f7 e8 30 23 d1 05 48 8b 45 c0 48 8d 53 48 48 8d 78 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 cd 02 00 00 48 8b 45 c0 8b 7d d0 48 8b 70 10
RSP: 0000:ffff8880aa347b58 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffffe8ffffc26150 RCX: 0000000000000000
RDX: ffffe8ffffc26198 RSI: 0000000000000004 RDI: 0000000000000010
RBP: ffff8880aa347be0 R08: 1ffffd1ffff84c2c R09: fffff91ffff84c2d
R10: fffff91ffff84c2c R11: ffffe8ffffc26163 R12: ffff888063506e90
R13: dffffc0000000000 R14: ffffe8ffffc26160 R15: ffff8880a61e1780
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f97bc79e1c4 CR3: 0000000074cd2000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
padata_do_serial+0x298/0x370 kernel/padata.c:418
pcrypt_aead_enc+0x10a/0x190 crypto/pcrypt.c:147
padata_parallel_worker+0x292/0x470 kernel/padata.c:88
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
---[ end trace 7fa41f27532f2727 ]---
RIP: 0010:padata_reorder+0x303/0x740 kernel/padata.c:263
Code: 00 0f 85 7f 03 00 00 4c 89 21 e8 88 21 e7 ff 4c 89 f7 e8 30 23 d1 05 48 8b 45 c0 48 8d 53 48 48 8d 78 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 cd 02 00 00 48 8b 45 c0 8b 7d d0 48 8b 70 10
RSP: 0000:ffff8880aa347b58 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffffe8ffffc26150 RCX: 0000000000000000
RDX: ffffe8ffffc26198 RSI: 0000000000000004 RDI: 0000000000000010
RBP: ffff8880aa347be0 R08: 1ffffd1ffff84c2c R09: fffff91ffff84c2d
R10: fffff91ffff84c2c R11: ffffe8ffffc26163 R12: ffff888063506e90
R13: dffffc0000000000 R14: ffffe8ffffc26160 R15: ffff8880a61e1780
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f97bc79e1c4 CR3: 0000000008e6d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug 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 syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Feb 11, 2020, 5:16:13 PM2/11/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 35766839 Linux 4.19.103
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1442dc29e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=84f14e7b6cbc7d27
dashboard link: https://syzkaller.appspot.com/bug?extid=927d15dee5db4725c2ea
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=127ae96ee00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10e3aa31e00000

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

audit: type=1400 audit(1581459138.614:36): avc: denied { map } for pid=8229 comm="syz-executor358" path="/root/syz-executor358189540" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2871 Comm: kworker/0:2 Not tainted 4.19.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: pencrypt padata_parallel_worker
RIP: 0010:padata_reorder+0x303/0x740 kernel/padata.c:263
Code: 00 0f 85 7f 03 00 00 4c 89 21 e8 88 21 e7 ff 4c 89 f7 e8 30 23 d1 05 48 8b 45 c0 48 8d 53 48 48 8d 78 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 cd 02 00 00 48 8b 45 c0 8b 7d d0 48 8b 70 10
RSP: 0018:ffff88809e6efb58 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffffe8ffffd26150 RCX: 0000000000000000
RDX: ffffe8ffffd26198 RSI: 0000000000000004 RDI: 0000000000000010
RBP: ffff88809e6efbe0 R08: 1ffffd1ffffa4c2c R09: fffff91ffffa4c2d
R10: fffff91ffffa4c2c R11: ffffe8ffffd26163 R12: ffff888082d010d0
R13: dffffc0000000000 R14: ffffe8ffffd26160 R15: ffff8880a5a34a00
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000050 CR3: 00000000902e8000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
padata_do_serial+0x298/0x370 kernel/padata.c:418
pcrypt_aead_enc+0x10a/0x190 crypto/pcrypt.c:147
padata_parallel_worker+0x292/0x470 kernel/padata.c:88
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
---[ end trace 298398f2d51646b9 ]---
RIP: 0010:padata_reorder+0x303/0x740 kernel/padata.c:263
Code: 00 0f 85 7f 03 00 00 4c 89 21 e8 88 21 e7 ff 4c 89 f7 e8 30 23 d1 05 48 8b 45 c0 48 8d 53 48 48 8d 78 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 cd 02 00 00 48 8b 45 c0 8b 7d d0 48 8b 70 10
RSP: 0018:ffff88809e6efb58 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffffe8ffffd26150 RCX: 0000000000000000
RDX: ffffe8ffffd26198 RSI: 0000000000000004 RDI: 0000000000000010
RBP: ffff88809e6efbe0 R08: 1ffffd1ffffa4c2c R09: fffff91ffffa4c2d
R10: fffff91ffffa4c2c R11: ffffe8ffffd26163 R12: ffff888082d010d0
R13: dffffc0000000000 R14: ffffe8ffffd26160 R15: ffff8880a5a34a00
FS: 0000000000000000(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000050 CR3: 00000000902e8000 CR4: 00000000001406f0

syzbot

unread,
Mar 15, 2020, 7:22:04 PM3/15/20
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit cad926f70b5a3ac61de0274c28891dc7fbd8d2ad
Author: Daniel Jordan <daniel....@oracle.com>
Date: Fri Feb 14 18:28:21 2020 +0000

padata: fix null pointer deref of pd->pinst

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1758e545e00000
start commit: 35766839 Linux 4.19.103
git tree: linux-4.19.y
If the result looks correct, please mark the bug fixed by replying with:

#syz fix: padata: fix null pointer deref of pd->pinst

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages