================================================================== BUG: KASAN: slab-out-of-bounds in nfsd+0xb77/0xc20 fs/nfsd/nfssvc.c:926 Read of size 8 at addr ffff888029f91ed8 by task nfsd/10641 CPU: 1 UID: 0 PID: 10641 Comm: nfsd Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 nfsd+0xb77/0xc20 fs/nfsd/nfssvc.c:926 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 10601: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x40 mm/kasan/common.c:79 poison_kmalloc_redzone mm/kasan/common.c:412 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:429 kasan_kmalloc include/linux/kasan.h:267 [inline] __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5680 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] __svc_create+0x5c/0xad0 net/sunrpc/svc.c:402 svc_create_pooled+0x2bb/0x3a0 net/sunrpc/svc.c:503 nfsd_create_serv+0x2c1/0x4e0 fs/nfsd/nfssvc.c:632 __write_ports_addxprt fs/nfsd/nfsctl.c:790 [inline] __write_ports fs/nfsd/nfsctl.c:829 [inline] write_ports+0x2f1/0xd60 fs/nfsd/nfsctl.c:882 nfsctl_transaction_write+0x106/0x1a0 fs/nfsd/nfsctl.c:117 vfs_write+0x2aa/0x1040 fs/read_write.c:665 ksys_write+0x12a/0x250 fs/read_write.c:719 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x14d/0x8e0 arch/x86/entry/syscall_32.c:286 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:311 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff888029f91c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes to the right of allocated 344-byte region [ffff888029f91c00, ffff888029f91d58) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29f90 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801d442c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801d442c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5172, tgid 5172 (mount), ts 10107363024 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1873 prep_new_page mm/page_alloc.c:1881 [inline] get_page_from_freelist+0xdae/0x2c80 mm/page_alloc.c:3963 __alloc_frozen_pages_noprof+0x2ad/0x31e0 mm/page_alloc.c:5505 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab mm/slub.c:3499 [inline] new_slab+0xb1/0x6d0 mm/slub.c:3550 refill_objects+0xe3/0x410 mm/slub.c:7546 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] __do_kmalloc_node mm/slub.c:5530 [inline] __kmalloc_noprof+0x677/0x840 mm/slub.c:5556 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] tomoyo_init_log+0x114d/0x1f80 security/tomoyo/audit.c:273 tomoyo_supervisor+0x506/0x1340 security/tomoyo/common.c:2232 tomoyo_audit_mount_log security/tomoyo/mount.c:33 [inline] tomoyo_mount_acl+0x580/0x8b0 security/tomoyo/mount.c:168 tomoyo_mount_permission+0x214/0x460 security/tomoyo/mount.c:239 security_sb_mount+0xdd/0x270 security/security.c:1102 path_mount+0x158/0x2850 fs/namespace.c:4279 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4563 [inline] __se_sys_mount fs/namespace.c:4540 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4540 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x780 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 35 tgid 35 ts 9337910469 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1415 [inline] free_pages_prepare+0x586/0xe00 mm/page_alloc.c:1460 __free_contig_range_common+0x14f/0x250 mm/page_alloc.c:7136 __free_contig_range mm/page_alloc.c:7181 [inline] free_pages_bulk+0x125/0x1f0 mm/page_alloc.c:5389 vm_area_free_pages+0xb2/0x2a0 mm/vmalloc.c:3498 vfree mm/vmalloc.c:3547 [inline] vfree+0xfc/0x850 mm/vmalloc.c:3521 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3451 process_one_work+0xaeb/0x1b40 kernel/workqueue.c:3497 process_scheduled_works kernel/workqueue.c:3580 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3661 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888029f91d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029f91e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029f91e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888029f91f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029f91f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================