Unable to handle kernel NULL pointer dereference at virtual address 0000000000000d40 Oops [#1] Modules linked in: CPU: 0 PID: 2867 Comm: ln Not tainted 5.14.0-syzkaller #0 Hardware name: riscv-virtio,qemu (DT) epc : slab_alloc_node mm/slub.c:2900 [inline] epc : slab_alloc mm/slub.c:2967 [inline] epc : __kmalloc+0xce/0x388 mm/slub.c:4111 ra : slab_pre_alloc_hook mm/slab.h:494 [inline] ra : slab_alloc_node mm/slub.c:2880 [inline] ra : slab_alloc mm/slub.c:2967 [inline] ra : __kmalloc+0x6e/0x388 mm/slub.c:4111 epc : ffffffff803e3568 ra : ffffffff803e3508 sp : ffffffe0091ff7c0 gp : ffffffff83f967d8 tp : ffffffe00bd1af80 t0 : ffffffc40176ba00 t1 : 0000000000000001 t2 : 0000000000000018 s0 : ffffffe0091ff860 s1 : ffffffe005601640 a0 : 0000000000000000 a1 : ffffffe0091ffbac a2 : 1ffffffc017a3717 a3 : 0000000000000d40 a4 : 0000000000000001 a5 : ffffffff82e4b2b0 a6 : 0000000000f00000 a7 : ffffffff8038ca52 s2 : ffffffff83f96adc s3 : 0000000000000d40 s4 : 0000000000000024 s5 : ffffffff8080a860 s6 : ffffffff83f9a0d0 s7 : 0000000000000000 s8 : 0000000000000d40 s9 : 0000000000000001 s10: ffffffe009d9af88 s11: 000000000000002f t3 : e7fceae755788800 t4 : ffffffc40123ff0f t5 : ffffffc40123ff11 t6 : ffffffe00bb5cffe status: 0000000000000120 badaddr: 0000000000000d40 cause: 000000000000000d [] slab_alloc_node mm/slub.c:2900 [inline] [] slab_alloc mm/slub.c:2967 [inline] [] __kmalloc+0xce/0x388 mm/slub.c:4111 [] kmalloc include/linux/slab.h:596 [inline] [] kzalloc include/linux/slab.h:721 [inline] [] tomoyo_encode2.part.0+0xf0/0x262 security/tomoyo/realpath.c:45 [] tomoyo_encode2 security/tomoyo/realpath.c:31 [inline] [] tomoyo_encode security/tomoyo/realpath.c:80 [inline] [] tomoyo_realpath_from_path+0x14c/0x3f4 security/tomoyo/realpath.c:288 [] tomoyo_get_realpath security/tomoyo/file.c:151 [inline] [] tomoyo_check_open_permission+0x1bc/0x288 security/tomoyo/file.c:771 [] tomoyo_file_open security/tomoyo/tomoyo.c:311 [inline] [] tomoyo_file_open+0x78/0x7c security/tomoyo/tomoyo.c:306 [] security_file_open+0x4c/0x2fa security/security.c:1634 [] do_dentry_open+0x1c6/0x7d4 fs/open.c:813 [] vfs_open+0x52/0x5e fs/open.c:949 [] do_open fs/namei.c:3374 [inline] [] path_openat+0x11ae/0x1694 fs/namei.c:3507 [] do_filp_open+0xac/0x1a8 fs/namei.c:3534 [] do_sys_openat2+0x102/0x26a fs/open.c:1204 [] do_sys_open fs/open.c:1220 [inline] [] __do_sys_openat fs/open.c:1236 [inline] [] sys_openat+0x80/0xee fs/open.c:1231 [] ret_from_syscall+0x0/0x2 ---[ end trace ad218eabbab7d000 ]---