================================================================== BUG: KASAN: use-after-free in u32_destroy_key.constprop.0+0x1a7/0x1e0 net/sched/cls_u32.c:405 Read of size 4 at addr ffff8880a9076e18 by task kworker/u4:5/2374 CPU: 0 PID: 2374 Comm: kworker/u4:5 Not tainted 4.14.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: tc_filter_workqueue u32_delete_key_freepf_work Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393 u32_destroy_key.constprop.0+0x1a7/0x1e0 net/sched/cls_u32.c:405 u32_delete_key_freepf_work+0x1c/0x22 net/sched/cls_u32.c:456 process_one_work+0x7c0/0x14c0 kernel/workqueue.c:2116 worker_thread+0x5d7/0x1080 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 12089: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x14d/0x3f0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] u32_init+0x3e9/0x890 net/sched/cls_u32.c:367 tcf_proto_create net/sched/cls_api.c:166 [inline] tc_ctl_tfilter+0xa68/0x18e7 net/sched/cls_api.c:677 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x64a/0xbb0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 2374: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 u32_destroy_key.constprop.0+0x108/0x1e0 net/sched/cls_u32.c:406 u32_delete_key_freepf_work+0x1c/0x22 net/sched/cls_u32.c:456 process_one_work+0x7c0/0x14c0 kernel/workqueue.c:2116 worker_thread+0x5d7/0x1080 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880a9076e00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 24 bytes inside of 64-byte region [ffff8880a9076e00, ffff8880a9076e40) The buggy address belongs to the page: page:ffffea0002a41d80 count:1 mapcount:0 mapping:ffff8880a9076000 index:0xffff8880a9076800 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a9076000 ffff8880a9076800 0000000100000011 raw: ffffea00024bff60 ffffea000221da60 ffff8880aa800340 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9076d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880a9076d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880a9076e00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880a9076e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a9076f00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================