================================================================== BUG: KASAN: use-after-free in rpc_net_ns+0x12a/0x1b0 net/sunrpc/clnt.c:1506 Read of size 8 at addr ffff8880a75548d8 by task kworker/1:1/23 CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted 5.7.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events rpc_free_client_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1e9/0x30e lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:382 __kasan_report+0x103/0x1a0 mm/kasan/report.c:511 kasan_report+0x4d/0x80 mm/kasan/common.c:625 Allocated by task 9181: save_stack mm/kasan/common.c:49 [inline] set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc+0x114/0x160 mm/kasan/common.c:495 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x24b/0x330 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc include/linux/slab.h:669 [inline] xprt_alloc+0x2b/0x740 net/sunrpc/xprt.c:1658 xs_setup_xprt net/sunrpc/xprtsock.c:2735 [inline] xs_setup_udp+0xdd/0x8d0 net/sunrpc/xprtsock.c:2850 xprt_create_transport+0xf3/0x3b0 net/sunrpc/xprt.c:1905 rpc_create+0x4ab/0x8a0 net/sunrpc/clnt.c:581 rpcb_create net/sunrpc/rpcb_clnt.c:393 [inline] rpcb_getport_async+0x7ba/0xfb0 net/sunrpc/rpcb_clnt.c:750 __rpc_execute+0x1d1/0xae0 net/sunrpc/sched.c:913 rpc_run_task+0x5a7/0x740 net/sunrpc/clnt.c:1153 rpc_call_sync net/sunrpc/clnt.c:1182 [inline] rpc_ping net/sunrpc/clnt.c:2738 [inline] rpc_create_xprt+0x2f6/0x700 net/sunrpc/clnt.c:482 rpc_create+0x5df/0x8a0 net/sunrpc/clnt.c:598 nfs_create_rpc_client+0x5a0/0x740 fs/nfs/client.c:535 nfs_init_client+0x53/0xf0 fs/nfs/client.c:652 nfs_init_server fs/nfs/client.c:691 [inline] nfs_create_server+0x87b/0x1c80 fs/nfs/client.c:978 nfs_try_get_tree+0x390/0xf20 fs/nfs/super.c:922 vfs_get_tree+0x88/0x270 fs/super.c:1547 do_new_mount fs/namespace.c:2816 [inline] do_mount+0x17ec/0x2900 fs/namespace.c:3141 __do_sys_mount fs/namespace.c:3350 [inline] __se_sys_mount+0xd3/0x100 fs/namespace.c:3327 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 2694: save_stack mm/kasan/common.c:49 [inline] set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x125/0x190 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kmem_cache_free_bulk+0x122/0x1d0 mm/slab.c:3721 kfree_bulk include/linux/slab.h:412 [inline] kfree_rcu_work+0x1c7/0x3a0 kernel/rcu/tree.c:2859 process_one_work+0x76e/0xfd0 kernel/workqueue.c:2268 worker_thread+0xa7f/0x1450 kernel/workqueue.c:2414 kthread+0x353/0x380 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff8880a7554000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2264 bytes inside of 4096-byte region [ffff8880a7554000, ffff8880a7555000) The buggy address belongs to the page: page:ffffea00029d5500 refcount:1 mapcount:0 mapping:0000000016bc0bbe index:0x0 head:ffffea00029d5500 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002a6b688 ffffea0002450188 ffff8880aa402000 raw: 0000000000000000 ffff8880a7554000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a7554780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a7554800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a7554880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a7554900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a7554980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================