================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:264 [inline] BUG: KASAN: use-after-free in rhashtable_last_table+0x10b/0x130 lib/rhashtable.c:156 Read of size 8 at addr ffff8801cbae0038 by task kworker/0:2/351 CPU: 0 PID: 351 Comm: kworker/0:2 Not tainted 4.9.190+ #1 Workqueue: events rht_deferred_worker ffff8801d5197a50 ffffffff81b66c51 0000000000000000 ffffea00072eb800 ffff8801cbae0038 0000000000000008 ffffffff81bba6fb ffff8801d5197a88 ffffffff8150c161 0000000000000000 ffff8801cbae0038 ffff8801cbae0038 Call Trace: [<00000000366d4e6b>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000366d4e6b>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000d94d9b40>] print_address_description+0x6f/0x23a mm/kasan/report.c:256 [<000000003e5e3910>] kasan_report_error mm/kasan/report.c:355 [inline] [<000000003e5e3910>] kasan_report mm/kasan/report.c:413 [inline] [<000000003e5e3910>] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:397 [<00000000c20a3c38>] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:434 [<000000004f9d0ce3>] __read_once_size include/linux/compiler.h:264 [inline] [<000000004f9d0ce3>] rhashtable_last_table+0x10b/0x130 lib/rhashtable.c:156 [<000000001bf0f0ab>] rht_deferred_worker+0x83/0x1a10 lib/rhashtable.c:368 [<0000000046b1ed15>] process_one_work+0x88b/0x1600 kernel/workqueue.c:2114 [<0000000016a67919>] worker_thread+0x5df/0x11d0 kernel/workqueue.c:2251 [<000000003525e7b3>] kthread+0x278/0x310 kernel/kthread.c:211 [<000000008ff70df4>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 Allocated by task 23: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack mm/kasan/kasan.c:512 [inline] set_track mm/kasan/kasan.c:524 [inline] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:616 kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:601 __kmalloc+0x133/0x320 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] bucket_table_alloc+0x31e/0x400 lib/rhashtable.c:126 rhashtable_expand lib/rhashtable.c:300 [inline] rht_deferred_worker+0x1e6/0x1a10 lib/rhashtable.c:371 process_one_work+0x88b/0x1600 kernel/workqueue.c:2114 worker_thread+0x5df/0x11d0 kernel/workqueue.c:2251 kthread+0x278/0x310 kernel/kthread.c:211 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 Freed by task 5344: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack mm/kasan/kasan.c:512 [inline] set_track mm/kasan/kasan.c:524 [inline] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:589 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xfc/0x310 mm/slub.c:3878 kvfree+0x4d/0x60 mm/util.c:356 bucket_table_free+0x4b/0x60 lib/rhashtable.c:107 rhashtable_free_and_destroy+0x1b3/0x630 lib/rhashtable.c:1010 inet_frags_exit_net+0x3d/0x50 net/ipv4/inet_fragment.c:151 ipv4_frags_exit_net+0x73/0x90 net/ipv4/ip_fragment.c:697 ops_exit_list.isra.0+0xb0/0x160 net/core/net_namespace.c:136 cleanup_net+0x3d6/0x8a0 net/core/net_namespace.c:474 process_one_work+0x88b/0x1600 kernel/workqueue.c:2114 worker_thread+0x5df/0x11d0 kernel/workqueue.c:2251 kthread+0x278/0x310 kernel/kthread.c:211 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 The buggy address belongs to the object at ffff8801cbae0000 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 56 bytes inside of 4096-byte region [ffff8801cbae0000, ffff8801cbae1000) The buggy address belongs to the page: page:ffffea00072eb800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cbadff00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801cbadff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801cbae0000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cbae0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cbae0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================