================================================================== BUG: KASAN: slab-out-of-bounds in predicate_parse kernel/trace/trace_events_filter.c:562 [inline] BUG: KASAN: slab-out-of-bounds in process_preds+0x1905/0x19d0 kernel/trace/trace_events_filter.c:1509 Read of size 4 at addr ffff8801c0c63ff0 by task syz-executor1/24387 CPU: 1 PID: 24387 Comm: syz-executor1 Not tainted 4.17.0+ #39 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 predicate_parse kernel/trace/trace_events_filter.c:562 [inline] process_preds+0x1905/0x19d0 kernel/trace/trace_events_filter.c:1509 create_filter+0x155/0x270 kernel/trace/trace_events_filter.c:1717 ftrace_profile_set_filter+0x130/0x2e0 kernel/trace/trace_events_filter.c:2042 perf_event_set_filter+0x22e/0x1230 kernel/events/core.c:9078 _perf_ioctl+0x84c/0x15e0 kernel/events/core.c:5059 perf_ioctl+0x59/0x80 kernel/events/core.c:5110 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1cf/0x16f0 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 __do_sys_ioctl fs/ioctl.c:708 [inline] __se_sys_ioctl fs/ioctl.c:706 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:706 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455b29 Code: 1d ba 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 eb b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f631590ec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f631590f6d4 RCX: 0000000000455b29 RDX: 0000000020000080 RSI: 0000000040082406 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004c4da8 R14: 00000000004cc250 R15: 0000000000000000 Allocated by task 21017: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:706 [inline] xprt_alloc+0x686/0x8f0 net/sunrpc/xprt.c:1223 xs_setup_xprt.part.11+0x56/0x2e0 net/sunrpc/xprtsock.c:2888 xs_setup_xprt net/sunrpc/xprtsock.c:2999 [inline] xs_setup_udp+0x12b/0x880 net/sunrpc/xprtsock.c:3004 xprt_create_transport+0x1d7/0x596 net/sunrpc/xprt.c:1433 rpc_create+0x489/0x900 net/sunrpc/clnt.c:573 rpcb_create+0x36f/0x500 net/sunrpc/rpcb_clnt.c:388 rpcb_getport_async+0x78e/0xee0 net/sunrpc/rpcb_clnt.c:744 call_bind+0x161/0x1c0 net/sunrpc/clnt.c:1772 __rpc_execute+0x28a/0xf50 net/sunrpc/sched.c:784 rpc_execute+0x37f/0x480 net/sunrpc/sched.c:852 rpc_run_task+0x615/0x8c0 net/sunrpc/clnt.c:1053 rpc_call_sync+0x196/0x290 net/sunrpc/clnt.c:1082 rpc_ping+0x155/0x1f0 net/sunrpc/clnt.c:2513 rpc_create_xprt+0x282/0x3f0 net/sunrpc/clnt.c:479 rpc_create+0x52e/0x900 net/sunrpc/clnt.c:587 nfs_create_rpc_client+0x63e/0x850 fs/nfs/client.c:523 nfs_init_client+0x74/0x100 fs/nfs/client.c:634 nfs_get_client+0x1065/0x1500 fs/nfs/client.c:425 nfs_init_server+0x364/0xfb0 fs/nfs/client.c:670 nfs_create_server+0x86/0x5f0 fs/nfs/client.c:953 nfs_try_mount+0x177/0xab0 fs/nfs/super.c:1884 nfs_fs_mount+0x17de/0x2efd fs/nfs/super.c:2695 mount_fs+0xae/0x328 fs/super.c:1277 vfs_kern_mount.part.34+0xd4/0x4d0 fs/namespace.c:1037 vfs_kern_mount fs/namespace.c:1027 [inline] do_new_mount fs/namespace.c:2518 [inline] do_mount+0x564/0x30b0 fs/namespace.c:2848 ksys_mount+0x12d/0x140 fs/namespace.c:3064 __do_sys_mount fs/namespace.c:3078 [inline] __se_sys_mount fs/namespace.c:3075 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3075 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 26: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 xprt_free_all_slots net/sunrpc/xprt.c:1204 [inline] xprt_free+0x28e/0x460 net/sunrpc/xprt.c:1247 xs_xprt_free net/sunrpc/xprtsock.c:903 [inline] xs_destroy+0x6e/0x80 net/sunrpc/xprtsock.c:920 xprt_destroy_cb+0xbf/0xe0 net/sunrpc/xprt.c:1479 process_one_work+0xc64/0x1b70 kernel/workqueue.c:2153 worker_thread+0x181/0x13a0 kernel/workqueue.c:2296 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 The buggy address belongs to the object at ffff8801c0c63d40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 176 bytes to the right of 512-byte region [ffff8801c0c63d40, ffff8801c0c63f40) The buggy address belongs to the page: page:ffffea00070318c0 count:1 mapcount:0 mapping:ffff8801da800940 index:0xffff8801c0c630c0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006f16ac8 ffffea0006e67288 ffff8801da800940 raw: ffff8801c0c630c0 ffff8801c0c630c0 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c0c63e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c0c63f00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801c0c63f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c0c64000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c0c64080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================