general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] CPU: 0 PID: 8507 Comm: syz-executor.2 Not tainted 5.7.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ima_free_template_entry+0x45/0x140 security/integrity/ima/ima_api.c:27 Code: 54 48 c1 ea 03 55 53 80 3c 02 00 0f 85 fe 00 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 10 48 8d 7b 20 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e b0 00 00 00 8b 43 20 85 c0 7e RSP: 0018:ffffc90009b3f538 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000004 RSI: 1ffff92001367ec0 RDI: 0000000000000020 RBP: ffff8880a4d74280 R08: ffffed1015d07104 R09: ffffed1015d07104 R10: ffff8880ae83881b R11: ffffed1015d07103 R12: 0000000000000000 R13: ffff8880a3155d10 R14: ffffffff89237a10 R15: ffff8880a3155d00 FS: 00007f58c7817700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbcd608d010 CR3: 0000000089d9d000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ima_alloc_init_template+0x350/0x520 security/integrity/ima/ima_api.c:80 ima_add_violation+0xf2/0x1b0 security/integrity/ima/ima_api.c:148 ima_rdwr_violation_check security/integrity/ima/ima_main.c:140 [inline] process_measurement+0xd74/0x1320 security/integrity/ima/ima_main.c:237 ima_file_check+0xb5/0x100 security/integrity/ima/ima_main.c:440 do_open fs/namei.c:3231 [inline] path_openat+0xd5e/0x21c0 fs/namei.c:3346 do_filp_open+0x171/0x240 fs/namei.c:3373 do_sys_openat2+0x2dc/0x500 fs/open.c:1148 do_sys_open+0x85/0xd0 fs/open.c:1164 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca69 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f58c7816c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00000000004f6cc0 RCX: 000000000045ca69 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000779 R14: 000000000052569f R15: 00007f58c78176d4 Modules linked in: ---[ end trace a6d49ec808fd8839 ]--- RIP: 0010:ima_free_template_entry+0x45/0x140 security/integrity/ima/ima_api.c:27 Code: 54 48 c1 ea 03 55 53 80 3c 02 00 0f 85 fe 00 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 10 48 8d 7b 20 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e b0 00 00 00 8b 43 20 85 c0 7e RSP: 0018:ffffc90009b3f538 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000004 RSI: 1ffff92001367ec0 RDI: 0000000000000020 RBP: ffff8880a4d74280 R08: ffffed1015d07104 R09: ffffed1015d07104 R10: ffff8880ae83881b R11: ffffed1015d07103 R12: 0000000000000000 R13: ffff8880a3155d10 R14: ffffffff89237a10 R15: ffff8880a3155d00 FS: 00007f58c7817700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbcd6098020 CR3: 0000000089d9d000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400