syzbot


BUG: unable to handle kernel NULL pointer dereference in get_block

Status: fixed on 2020/09/10 09:33
Reported-by: syzbot+cb4500d8db7b875b297e@syzkaller.appspotmail.com
Fix commit: 3c775629a5ff fs/minix: check return value of sb_getblk()
First crash: 1710d, last: 1563d
Fix bisection: fixed by (bisect log) :
commit 3c775629a5ffe3f6305f9a4f53d8167f629435ad
Author: Eric Biggers <ebiggers@google.com>
Date: Wed Aug 12 01:35:24 2020 +0000

  fs/minix: check return value of sb_getblk()

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in get_block C done 60 1559d 1710d 1/1 fixed on 2020/09/15 07:46
linux-4.14 BUG: unable to handle kernel NULL pointer dereference in get_block (2) C 1 630d 713d 0/1 upstream: reported C repro on 2022/12/09 08:52
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/09/10 02:09 6h37m bisect fix linux-4.14.y OK (1) job log
2020/08/11 01:42 26m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
minix_free_inode: bit 1 already cleared
minix_free_inode: bit 1 already cleared
MINIX-fs: mounting unchecked file system, running fsck is recommended
minix_free_inode: bit 1 already cleared
MINIX-fs: mounting unchecked file system, running fsck is recommended
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: test_and_set_bit arch/x86/include/asm/bitops.h:220 [inline]
IP: test_and_set_bit_lock arch/x86/include/asm/bitops.h:233 [inline]
IP: trylock_buffer include/linux/buffer_head.h:359 [inline]
IP: lock_buffer include/linux/buffer_head.h:365 [inline]
IP: alloc_branch fs/minix/itree_common.c:88 [inline]
IP: get_block+0x6a7/0x10f0 fs/minix/itree_common.c:191
MINIX-fs: mounting unchecked file system, running fsck is recommended
PGD 99b42067 P4D 99b42067 PUD a17db067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 13291 Comm: syz-executor217 Not tainted 4.14.174-syzkaller #0
minix_free_inode: bit 1 already cleared
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88809284c400 task.stack: ffff88807a848000
RIP: 0010:test_and_set_bit arch/x86/include/asm/bitops.h:220 [inline]
RIP: 0010:test_and_set_bit_lock arch/x86/include/asm/bitops.h:233 [inline]
RIP: 0010:trylock_buffer include/linux/buffer_head.h:359 [inline]
RIP: 0010:lock_buffer include/linux/buffer_head.h:365 [inline]
RIP: 0010:alloc_branch fs/minix/itree_common.c:88 [inline]
RIP: 0010:get_block+0x6a7/0x10f0 fs/minix/itree_common.c:191
RSP: 0018:ffff88807a84f808 EFLAGS: 00010246
RAX: 0000000000000007 RBX: ffff88807a84f910 RCX: 1ffffffff10279bc
RDX: 0000000000000000 RSI: ffffffff87d842e0 RDI: ffff88809284c424
RBP: ffff88807a84f988 R08: 0000000000000001 R09: 0000000000000003
R10: ffff88809284ccf8 R11: ffff88809284c400 R12: ffff88807a84f8d4
R13: ffff888091a8b0c0 R14: dffffc0000000000 R15: 0000000000000000
FS:  00007f97d7722700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000009ecd3000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 minix_get_block+0xd6/0x100 fs/minix/inode.c:379
 __block_write_begin_int+0x337/0x1030 fs/buffer.c:2027
 __block_write_begin fs/buffer.c:2077 [inline]
 block_write_begin+0x58/0x260 fs/buffer.c:2136
 minix_write_begin+0x35/0xc0 fs/minix/inode.c:415
 generic_perform_write+0x1c9/0x420 mm/filemap.c:3047
 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3172
 generic_file_write_iter+0x2fa/0x650 mm/filemap.c:3200
 call_write_iter include/linux/fs.h:1777 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x44e/0x630 fs/read_write.c:482
 vfs_write+0x192/0x4e0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x44de19
RSP: 002b:00007f97d7721ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006e0c28 RCX: 000000000044de19
RDX: 000000000000fdef RSI: 00000000200002c0 RDI: 0000000000000003
RBP: 00000000006e0c20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e0c2c
R13: 00007fff829ff5cf R14: 00007f97d77229c0 R15: 0000000000000000
Code: ca 08 00 00 49 8b bf 28 01 00 00 b9 08 00 00 00 e8 0f 07 c6 ff 31 d2 be 6c 01 00 00 48 c7 c7 e0 f2 b9 86 49 89 c7 e8 b9 46 6d ff <f0> 41 0f ba 2f 02 0f 83 1f fe ff ff e8 f8 32 89 ff 4c 89 ff e8 
RIP: test_and_set_bit arch/x86/include/asm/bitops.h:220 [inline] RSP: ffff88807a84f808
RIP: test_and_set_bit_lock arch/x86/include/asm/bitops.h:233 [inline] RSP: ffff88807a84f808
RIP: trylock_buffer include/linux/buffer_head.h:359 [inline] RSP: ffff88807a84f808
RIP: lock_buffer include/linux/buffer_head.h:365 [inline] RSP: ffff88807a84f808
RIP: alloc_branch fs/minix/itree_common.c:88 [inline] RSP: ffff88807a84f808
RIP: get_block+0x6a7/0x10f0 fs/minix/itree_common.c:191 RSP: ffff88807a84f808
CR2: 0000000000000000
MINIX-fs: mounting unchecked file system, running fsck is recommended
---[ end trace fc19d9739b56a32a ]---

Crashes (45):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/01 09:00 linux-4.14.y 01364dad1d45 a34e2c33 .config console log report syz C ci2-linux-4-14
2020/03/31 04:59 linux-4.14.y 01364dad1d45 c8d1cc20 .config console log report syz C ci2-linux-4-14
2020/03/17 11:10 linux-4.14.y 12cd844a39ed 749688d2 .config console log report syz C ci2-linux-4-14
2020/07/12 01:42 linux-4.14.y b850307b279c 7ba05d2d .config console log report ci2-linux-4-14
2020/07/06 04:49 linux-4.14.y b850307b279c 22f87567 .config console log report ci2-linux-4-14
2020/07/05 23:52 linux-4.14.y b850307b279c 22f87567 .config console log report ci2-linux-4-14
2020/07/05 22:13 linux-4.14.y b850307b279c 22f87567 .config console log report ci2-linux-4-14
2020/07/04 07:53 linux-4.14.y b850307b279c 51095195 .config console log report ci2-linux-4-14
2020/06/28 17:31 linux-4.14.y b850307b279c a2cdad9d .config console log report ci2-linux-4-14
2020/06/25 17:17 linux-4.14.y b850307b279c c7b4497a .config console log report ci2-linux-4-14
2020/06/22 10:18 linux-4.14.y b850307b279c eabcced4 .config console log report ci2-linux-4-14
2020/06/18 21:34 linux-4.14.y b850307b279c 3ea11d3f .config console log report ci2-linux-4-14
2020/06/13 14:57 linux-4.14.y b850307b279c dbce178a .config console log report ci2-linux-4-14
2020/06/13 03:53 linux-4.14.y b850307b279c 3036d6fd .config console log report ci2-linux-4-14
2020/06/10 06:25 linux-4.14.y c6db52a88798 860c4de9 .config console log report ci2-linux-4-14
2020/06/09 11:18 linux-4.14.y c6db52a88798 0d60b78a .config console log report ci2-linux-4-14
2020/06/03 23:58 linux-4.14.y c6db52a88798 a5ce5de0 .config console log report ci2-linux-4-14
2020/06/01 01:26 linux-4.14.y 4f68020fef1c a0331e89 .config console log report ci2-linux-4-14
2020/05/27 00:50 linux-4.14.y a41ba30d9df2 9072c126 .config console log report ci2-linux-4-14
2020/05/25 22:19 linux-4.14.y a41ba30d9df2 73964a9b .config console log report ci2-linux-4-14
2020/05/16 11:48 linux-4.14.y ab9dfda23248 37bccd4e .config console log report ci2-linux-4-14
2020/05/09 01:13 linux-4.14.y d71f695ce745 e97b06d3 .config console log report ci2-linux-4-14
2020/05/08 16:54 linux-4.14.y d71f695ce745 fe4122c3 .config console log report ci2-linux-4-14
2020/05/08 16:33 linux-4.14.y d71f695ce745 fe4122c3 .config console log report ci2-linux-4-14
2020/05/04 15:55 linux-4.14.y 773e2b1cd56a 58ae5e18 .config console log report ci2-linux-4-14
2020/05/03 09:47 linux-4.14.y 773e2b1cd56a 5457883a .config console log report ci2-linux-4-14
2020/05/01 01:44 linux-4.14.y 050272a0423e 3698959a .config console log report ci2-linux-4-14
2020/04/29 13:21 linux-4.14.y 050272a0423e ba2806db .config console log report ci2-linux-4-14
2020/04/27 18:26 linux-4.14.y 050272a0423e 0ce7569e .config console log report ci2-linux-4-14
2020/04/27 01:56 linux-4.14.y 050272a0423e 0ce7569e .config console log report ci2-linux-4-14
2020/04/24 21:19 linux-4.14.y 050272a0423e 03d97a1b .config console log report ci2-linux-4-14
2020/04/24 18:37 linux-4.14.y 050272a0423e 03d97a1b .config console log report ci2-linux-4-14
2020/04/15 18:33 linux-4.14.y c10b57a567e4 3f3c5574 .config console log report ci2-linux-4-14
2020/04/15 06:16 linux-4.14.y c10b57a567e4 3f3c5574 .config console log report ci2-linux-4-14
2020/04/15 00:22 linux-4.14.y c10b57a567e4 3f3c5574 .config console log report ci2-linux-4-14
2020/04/14 20:54 linux-4.14.y c10b57a567e4 3f3c5574 .config console log report ci2-linux-4-14
2020/04/14 09:13 linux-4.14.y c10b57a567e4 7c54686a .config console log report ci2-linux-4-14
2020/04/07 07:35 linux-4.14.y 4520f06b03ae 99a96044 .config console log report ci2-linux-4-14
2020/04/03 15:19 linux-4.14.y 4520f06b03ae 5ed396e6 .config console log report ci2-linux-4-14
2020/03/31 09:15 linux-4.14.y 01364dad1d45 c8d1cc20 .config console log report ci2-linux-4-14
2020/03/29 20:33 linux-4.14.y 01364dad1d45 05736b29 .config console log report ci2-linux-4-14
2020/03/28 02:24 linux-4.14.y 01364dad1d45 831e9a81 .config console log report ci2-linux-4-14
2020/03/21 12:28 linux-4.14.y 01364dad1d45 aa6c6a55 .config console log report ci2-linux-4-14
2020/03/19 22:23 linux-4.14.y 12cd844a39ed 2c31c529 .config console log report ci2-linux-4-14
2020/03/17 10:41 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.