================================================================== BUG: KASAN: invalid-access in smk_access+0x54/0x148 security/smack/smack_access.c:147 Read at addr fdf0000008e4fed0 by task syz.0.96/3827 Pointer tag: [fd], memory tag: [fb] CPU: 0 UID: 0 PID: 3827 Comm: syz.0.96 Not tainted 6.11.0-syzkaller-04557-g2f27fce67173 #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x94/0xec arch/arm64/kernel/stacktrace.c:319 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x78/0x90 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x108/0x618 mm/kasan/report.c:488 kasan_report+0x88/0xac mm/kasan/report.c:601 report_tag_fault arch/arm64/mm/fault.c:332 [inline] do_tag_recovery arch/arm64/mm/fault.c:344 [inline] __do_kernel_fault+0x170/0x1c8 arch/arm64/mm/fault.c:386 do_bad_area arch/arm64/mm/fault.c:486 [inline] do_tag_check_fault+0x78/0x8c arch/arm64/mm/fault.c:803 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:879 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:432 el1h_64_sync_handler+0xd8/0xe4 arch/arm64/kernel/entry-common.c:492 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:593 smk_access+0x54/0x148 security/smack/smack_access.c:147 smack_watch_key+0xe0/0xf8 security/smack/smack_lsm.c:4656 security_watch_key+0x58/0x148 security/security.c:4448 keyctl_watch_key+0xb0/0x1cc security/keys/keyctl.c:1813 __do_sys_keyctl security/keys/keyctl.c:2021 [inline] __se_sys_keyctl security/keys/keyctl.c:1874 [inline] __arm64_sys_keyctl+0x50/0x290 security/keys/keyctl.c:1874 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0x34/0xec arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at fff0000008e4fed0 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [fff0000008e4fed0, fff0000008e4fee0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xfdf0000008e4fc20 pfn:0x48e4f flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff|kasantag=0x0) page_type: 0xfdffffff(slab) raw: 01ffc00000000000 faf0000003001400 dead000000000122 0000000000000000 raw: fdf0000008e4fc20 00000000810000ec 00000001fdffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: fff0000008e4fc00: f0 fc fe fd f9 f3 f1 f3 fe f6 f8 f4 fb f5 f0 f0 fff0000008e4fd00: f0 fc f7 fe fe f9 f6 fe fd fc f9 f2 f2 fe fe fe >fff0000008e4fe00: fe fe fe fe f8 fe f7 fe f3 fc fe fd fe fb fe fa ^ fff0000008e4ff00: fe fe f0 fc fc f4 f5 fa f9 fd fd fa fc f7 fe fe fff0000008e50000: f8 f8 f8 f8 f8 f8 f8 f8 f8 fa fa fa fa fa fa fa ================================================================== Unable to handle kernel paging request at virtual address 002e79726f6d6560 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [002e79726f6d6560] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 UID: 0 PID: 3827 Comm: syz.0.96 Tainted: G B 6.11.0-syzkaller-04557-g2f27fce67173 #0 Tainted: [B]=BAD_PAGE Hardware name: linux,dummy-virt (DT) pstate: 21400009 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : __pi_strlen+0x124/0x150 arch/arm64/lib/strlen.S:194 lr : audit_log_untrustedstring+0x20/0x40 kernel/audit.c:2135 sp : ffff80008964bc00 x29: ffff80008964bc00 x28: f3f000000412db40 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: f9f0000008c9a140 x23: 00000000fffffff3 x22: 0000000000000000 x21: ffff800080515a80 x20: f6f0000003042320 x19: 732e79726f6d656d x18: ffffffffffffffff x17: ffff800080027db0 x16: ffff8000804ec358 x15: ffff80008964b9e0 x14: 0000000000000000 x13: fcf000000461d81e x12: ffff800080027eb8 x11: ffff800080011558 x10: 000000000000005f x9 : 000000000000033e x8 : 0101010101010101 x7 : 00000000000006c0 x6 : 0000000000000058 x5 : fcf000000461d858 x4 : 000000000000000d x3 : 0000000000000060 x2 : 0000000000000000 x1 : 732e79726f6d6560 x0 : 732e79726f6d656d Call trace: __pi_strlen+0x124/0x150 arch/arm64/lib/strlen.S:193 smack_log_callback+0x7c/0xc8 security/smack/smack_access.c:321 common_lsm_audit+0x5c/0x85c security/lsm_audit.c:456 smack_log+0xec/0x140 security/smack/smack_access.c:383 smk_access+0x104/0x148 security/smack/smack_access.c:199 smack_watch_key+0xe0/0xf8 security/smack/smack_lsm.c:4656 security_watch_key+0x58/0x148 security/security.c:4448 keyctl_watch_key+0xb0/0x1cc security/keys/keyctl.c:1813 __do_sys_keyctl security/keys/keyctl.c:2021 [inline] __se_sys_keyctl security/keys/keyctl.c:1874 [inline] __arm64_sys_keyctl+0x50/0x290 security/keys/keyctl.c:1874 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0x34/0xec arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:598 Code: fa4008a0 54fffde0 17ffffe6 927cec01 (a9400c22) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: fa4008a0 ccmp x5, #0x0, #0x0, eq // eq = none 4: 54fffde0 b.eq 0xffffffffffffffc0 // b.none 8: 17ffffe6 b 0xffffffffffffffa0 c: 927cec01 and x1, x0, #0xfffffffffffffff0 * 10: a9400c22 ldp x2, x3, [x1] <-- trapping instruction