syzbot


UBSAN: shift-out-of-bounds in extAlloc

Status: fixed on 2023/10/20 00:28
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+101992cd74f73e92da5d@syzkaller.appspotmail.com
Fix commit: 8f994b830dd0 jfs: validate max amount of blocks before allocation.
First crash: 407d, last: 215d
Fix bisection: fixed by (bisect log) :
commit 8f994b830dd0cf1239c85d900ce5df2030d95e0c
Author: Alexei Filippov <halip0503@gmail.com>
Date: Sat Aug 19 17:32:16 2023 +0000

  jfs: validate max amount of blocks before allocation.

  
Bug presence (1)
Date Name Commit Repro Result
2023/05/10 upstream (ToT) ad2fd53a7870 C [report] UBSAN: array-index-out-of-bounds in xtInsert
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in extAlloc jfs C error 6605 211d 571d 23/26 fixed on 2023/10/12 12:47
linux-6.1 UBSAN: shift-out-of-bounds in extAlloc origin:upstream missing-backport C done 203 153d 403d 0/3 upstream: reported C repro on 2023/03/12 23:53

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_extent.c:511:16
shift exponent -1 is negative
CPU: 0 PID: 3499 Comm: syz-executor931 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
 extBalloc fs/jfs/jfs_extent.c:511 [inline]
 extAlloc+0xe4f/0x1010 fs/jfs/jfs_extent.c:125
 jfs_get_block+0x417/0xe50 fs/jfs/inode.c:258
 get_more_blocks fs/direct-io.c:673 [inline]
 do_direct_IO fs/direct-io.c:959 [inline]
 do_blockdev_direct_IO fs/direct-io.c:1276 [inline]
 __blockdev_direct_IO+0x1b13/0x4f40 fs/direct-io.c:1368
 blockdev_direct_IO include/linux/fs.h:3230 [inline]
 jfs_direct_IO+0xf6/0x1e0 fs/jfs/inode.c:343
 generic_file_direct_write+0x204/0x460 mm/filemap.c:3678
 __generic_file_write_iter+0x2a2/0x4f0 mm/filemap.c:3860
 generic_file_write_iter+0xa7/0x1b0 mm/filemap.c:3935
 do_iter_readv_writev+0x594/0x7a0
 do_iter_write+0x1ea/0x760 fs/read_write.c:855
 iter_file_splice_write+0x806/0xfa0 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0xe3/0x1c0 fs/splice.c:936
 splice_direct_to_actor+0x500/0xc10 fs/splice.c:891
 do_splice_direct+0x285/0x3d0 fs/splice.c:979
 do_sendfile+0x625/0xff0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1317 [inline]
 __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1303
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fd4d77b9119
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc36c4e2b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007fd4d77b9119
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 7261637369646f6e R08: 00005555565f64c0 R09: 00005555565f64c0
R10: 0001000000201004 R11: 0000000000000246 R12: 6573726168636f69
R13: 65756e69746e6f63 R14: 633d73726f727265 R15: 00007fd4d780203b
 </TASK>
================================================================================

Crashes (217):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/19 14:18 linux-5.15.y d54cfc420586 022df2bb .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/07/12 09:29 linux-5.15.y d54cfc420586 2f19aa4f .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/30 15:38 linux-5.15.y 4af60700a60c 01298212 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/24 20:52 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/18 13:39 linux-5.15.y 471e639e59d1 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/17 01:23 linux-5.15.y 471e639e59d1 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/13 19:03 linux-5.15.y 7349e40704a0 749afb64 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/11 12:07 linux-5.15.y 7349e40704a0 49519f06 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/09 09:10 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/06/09 04:05 linux-5.15.y d7af3e5ba454 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/05/30 06:40 linux-5.15.y 1fe619a7d252 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/05/23 13:00 linux-5.15.y 9d6bde853685 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/05/19 00:52 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/05/14 05:07 linux-5.15.y b0ece631f84a 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/07/13 12:37 linux-5.15.y d54cfc420586 86081196 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/05/19 10:42 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/05/19 06:59 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/03/26 02:40 linux-5.15.y 115472395b0a fbf0499a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/03/17 04:20 linux-5.15.y 2ddbd0f967b3 18b58603 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/06/24 03:50 linux-5.15.y f67653019430 79782afc .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/04/29 15:16 linux-5.15.y f48aeeaaa64c 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/17 13:57 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/17 11:37 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/16 17:28 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/14 18:10 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/11 20:44 linux-5.15.y aff03380bda4 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/08 23:34 linux-5.15.y aff03380bda4 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/08 19:47 linux-5.15.y aff03380bda4 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/08 07:23 linux-5.15.y aff03380bda4 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/05 10:30 linux-5.15.y 8f790700c974 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/03 08:25 linux-5.15.y 8f790700c974 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/02 22:07 linux-5.15.y 8f790700c974 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/09/17 09:29 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/16 22:29 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/13 15:13 linux-5.15.y aff03380bda4 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/13 01:01 linux-5.15.y aff03380bda4 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/08 17:49 linux-5.15.y aff03380bda4 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/06 23:46 linux-5.15.y aff03380bda4 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/05 05:31 linux-5.15.y 8f790700c974 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/04 16:56 linux-5.15.y 8f790700c974 db3306a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/04 04:20 linux-5.15.y 8f790700c974 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/09/01 13:24 linux-5.15.y 9e43368a3393 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/28 16:25 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/28 13:40 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/28 07:15 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/27 00:16 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/24 07:31 linux-5.15.y f6f7927ac664 4d7ae7ab .config console log report info ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/24 04:34 linux-5.15.y f6f7927ac664 4d7ae7ab .config console log report info ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/24 01:13 linux-5.15.y f6f7927ac664 b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/22 10:35 linux-5.15.y f6f7927ac664 6b415825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/22 03:40 linux-5.15.y f6f7927ac664 6b415825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/21 22:51 linux-5.15.y f6f7927ac664 6b415825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/17 01:08 linux-5.15.y f6f7927ac664 74b106b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/16 14:44 linux-5.15.y 24c4de4069cb 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/15 18:51 linux-5.15.y 24c4de4069cb 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/12 02:20 linux-5.15.y 24c4de4069cb 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/10 04:53 linux-5.15.y c275eaaaa342 13ca4cd6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/09 16:12 linux-5.15.y c275eaaaa342 8ad1a287 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/08 15:21 linux-5.15.y 38d4ca22a528 9552ae77 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/08 02:43 linux-5.15.y 38d4ca22a528 b1b6ae3d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in extAlloc
2023/08/29 20:31 linux-5.15.y 5ddfe5cc8716 ce731e62 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/28 15:19 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/28 11:40 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/27 19:51 linux-5.15.y 5ddfe5cc8716 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/26 10:31 linux-5.15.y f6f7927ac664 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/25 18:22 linux-5.15.y f6f7927ac664 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/11 23:14 linux-5.15.y 24c4de4069cb 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/08/11 12:40 linux-5.15.y c275eaaaa342 da3c3ef8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
2023/03/09 15:42 linux-5.15.y d9b4a0c83a2d f08b59ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in extAlloc
* Struck through repros no longer work on HEAD.