UBSAN: array-index-out-of-bounds in security/integrity/ima/ima_appraise.c:621:36 index 20 is out of range for type 'char *[20]' CPU: 1 PID: 28596 Comm: syz-executor.0 Not tainted 5.14.0-rc6-next-20210819-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 ubsan_epilogue+0xb/0x5a lib/ubsan.c:151 __ubsan_handle_out_of_bounds.cold+0x64/0x70 lib/ubsan.c:291 validate_hash_algo security/integrity/ima/ima_appraise.c:621 [inline] ima_inode_setxattr+0x536/0x540 security/integrity/ima/ima_appraise.c:656 security_inode_setxattr+0x148/0x240 security/security.c:1355 __vfs_setxattr_locked+0xa7/0x260 fs/xattr.c:266 vfs_setxattr+0x14e/0x350 fs/xattr.c:301 setxattr+0x21b/0x2b0 fs/xattr.c:575 path_setxattr+0x19d/0x1d0 fs/xattr.c:595 __do_sys_setxattr fs/xattr.c:611 [inline] __se_sys_setxattr fs/xattr.c:607 [inline] __x64_sys_setxattr+0xc0/0x160 fs/xattr.c:607 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb81d15e188 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000020000200 RSI: 0000000020000180 RDI: 0000000020000140 RBP: 00000000004bfcc4 R08: 0000000000000001 R09: 0000000000000000 R10: 000000000000001e R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fffab891b9f R14: 00007fb81d15e300 R15: 0000000000022000 ================================================================================