syzbot


UBSAN: shift-out-of-bounds in scalar32_min_max_arsh

Status: upstream: reported C repro on 2023/12/17 16:19
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+4e6d9667667204fca9b9@syzkaller.appspotmail.com
First crash: 339d, last: 27d
Bug presence (4)
Date Name Commit Repro Result
2024/01/31 android13-5.15-lts (ToT) 1c3a1f32bcbd C [report] UBSAN: shift-out-of-bounds in scalar32_min_max_arsh
2023/12/17 lts (merge base) 2a910f4af54d C [report] UBSAN: shift-out-of-bounds in scalar32_min_max_arsh
2023/12/17 upstream (ToT) 0e389834672c C [report] UBSAN: shift-out-of-bounds in scalar32_min_max_arsh
2024/01/31 upstream (ToT) 6764c317b6bb C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 UBSAN: shift-out-of-bounds in scalar32_min_max_arsh origin:upstream missing-backport C inconclusive 1 48d 339d 0/3 upstream: reported C repro on 2023/12/17 16:29
linux-6.1 UBSAN: shift-out-of-bounds in scalar32_min_max_arsh origin:upstream C done 1 336d 336d 3/3 fixed on 2024/01/20 11:41
android-6-1 UBSAN: shift-out-of-bounds in scalar32_min_max_arsh origin:upstream missing-backport C done done 2 248d 339d 0/2 auto-obsoleted due to no activity on 2024/06/25 14:59
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/09/23 11:08 45m retest repro android13-5.15-lts report log
2024/08/04 12:12 14m retest repro android13-5.15-lts report log
2024/07/03 05:24 5m retest repro android13-5.15-lts report log
2024/04/23 23:05 6m retest repro android13-5.15-lts report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/10/25 05:22 1h13m bisect fix android13-5.15-lts OK (0) job log log
2024/09/08 22:57 1h04m bisect fix android13-5.15-lts OK (0) job log log
2024/05/26 10:48 1h19m bisect fix android13-5.15-lts OK (0) job log log
2024/04/08 22:11 1h06m bisect fix android13-5.15-lts OK (0) job log log
2024/03/09 02:03 45m bisect fix android13-5.15-lts OK (0) job log log

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in kernel/bpf/verifier.c:7979:63
shift exponent 1073741824 is too large for 32-bit type 's32' (aka 'int')
CPU: 0 PID: 292 Comm: syz-executor319 Not tainted 5.15.139-syzkaller-00529-g05ef4ccb5774 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x17 lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
 scalar32_min_max_arsh+0x622/0x6c0 kernel/bpf/verifier.c:7979
 adjust_scalar_min_max_vals kernel/bpf/verifier.c:8167 [inline]
 adjust_reg_min_max_vals+0x3d1d/0x6360 kernel/bpf/verifier.c:8268
 check_alu_op kernel/bpf/verifier.c:8439 [inline]
 do_check+0x94d9/0xf2c0 kernel/bpf/verifier.c:11183
 do_check_common+0x909/0x1290 kernel/bpf/verifier.c:13398
 do_check_main kernel/bpf/verifier.c:13461 [inline]
 bpf_check+0x3835/0x12bf0 kernel/bpf/verifier.c:14032
 bpf_prog_load+0x12ac/0x1b50 kernel/bpf/syscall.c:2327
 __sys_bpf+0x4bc/0x760 kernel/bpf/syscall.c:4618
 __do_sys_bpf kernel/bpf/syscall.c:4722 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4720 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:4720
 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:0x7ff1d19493e9
Code: 48 83 c4 28 c3 e8 37 17 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe67a82798 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffe67a82978 RCX: 00007ff1d19493e9
RDX: 0000000000000048 RSI: 00000000200054c0 RDI: 0000000000000005
RBP: 00007ff1d19bc610 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe67a82968 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
================================================================================
================================================================================
UBSAN: shift-out-of-bounds in kernel/bpf/verifier.c:7980:63
shift exponent 1073741824 is too large for 32-bit type 's32' (aka 'int')
CPU: 0 PID: 292 Comm: syz-executor319 Not tainted 5.15.139-syzkaller-00529-g05ef4ccb5774 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x17 lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
 scalar32_min_max_arsh+0x676/0x6c0 kernel/bpf/verifier.c:7980
 adjust_scalar_min_max_vals kernel/bpf/verifier.c:8167 [inline]
 adjust_reg_min_max_vals+0x3d1d/0x6360 kernel/bpf/verifier.c:8268
 check_alu_op kernel/bpf/verifier.c:8439 [inline]
 do_check+0x94d9/0xf2c0 kernel/bpf/verifier.c:11183
 do_check_common+0x909/0x1290 kernel/bpf/verifier.c:13398
 do_check_main kernel/bpf/verifier.c:13461 [inline]
 bpf_check+0x3835/0x12bf0 kernel/bpf/verifier.c:14032
 bpf_prog_load+0x12ac/0x1b50 kernel/bpf/syscall.c:2327
 __sys_bpf+0x4bc/0x760 kernel/bpf/syscall.c:4618
 __do_sys_bpf kernel/bpf/syscall.c:4722 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4720 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:4720
 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:0x7ff1d19493e9
Code: 48 83 c4 28 c3 e8 37 17 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe67a82798 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffe67a82978 RCX: 00007ff1d19493e9
RDX: 0000000000000048 RSI: 00000000200054c0 RDI: 0000000000000005
RBP: 00007ff1d19bc610 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe67a82968 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
=================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/17 16:18 android13-5.15-lts 05ef4ccb5774 3222d10c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf UBSAN: shift-out-of-bounds in scalar32_min_max_arsh
2023/12/17 16:17 android13-5.15-lts 05ef4ccb5774 3222d10c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-15 UBSAN: shift-out-of-bounds in scalar32_min_max_arsh
* Struck through repros no longer work on HEAD.