syzbot


KASAN: use-after-free Read in rhashtable_last_table (3)

Status: auto-obsoleted due to no activity on 2022/11/27 23:30
Reported-by: syzbot+c25ee831321ec361320b@syzkaller.appspotmail.com
First crash: 844d, last: 844d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in rhashtable_last_table net 4 2132d 2244d 0/28 closed as invalid on 2019/04/19 22:15
android-49 KASAN: use-after-free Read in rhashtable_last_table 2 1827d 1909d 0/3 auto-closed as invalid on 2020/03/20 18:26
upstream KASAN: use-after-free Read in rhashtable_last_table (2) net 1 2009d 2009d 12/28 fixed on 2019/08/05 13:45
linux-4.19 KASAN: use-after-free Read in rhashtable_last_table 2 1283d 1357d 0/1 auto-closed as invalid on 2021/09/15 21:37
linux-4.19 KASAN: use-after-free Read in rhashtable_last_table (2) 1 1077d 1077d 0/1 auto-closed as invalid on 2022/04/09 15:34
linux-4.14 KASAN: use-after-free Read in rhashtable_last_table 1 1316d 1316d 0/1 auto-closed as invalid on 2021/08/13 13:57

Sample crash report:
device hsr_slave_1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): hsr_slave_0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): hsr_slave_1: link is not ready
IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready
==================================================================
BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:263 [inline]
BUG: KASAN: use-after-free in rhashtable_last_table+0x167/0x180 lib/rhashtable.c:217
Read of size 8 at addr ffff888054e68280 by task kworker/1:1/33

CPU: 1 PID: 33 Comm: kworker/1:1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Workqueue: events rht_deferred_worker
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
 __read_once_size include/linux/compiler.h:263 [inline]
 rhashtable_last_table+0x167/0x180 lib/rhashtable.c:217
8021q: adding VLAN 0 to HW filter on device bond0
 rht_deferred_worker+0xa7/0x1b20 lib/rhashtable.c:410
 process_one_work+0x864/0x1570 kernel/workqueue.c:2153
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
 kthread+0x33f/0x460 kernel/kthread.c:259
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Allocated by task 8170:
 __do_kmalloc_node mm/slab.c:3689 [inline]
 __kmalloc_node+0x4c/0x70 mm/slab.c:3696
 kmalloc_node include/linux/slab.h:557 [inline]
 kvmalloc_node+0xb4/0xf0 mm/util.c:423
 kvmalloc include/linux/mm.h:577 [inline]
 kvzalloc include/linux/mm.h:585 [inline]
 bucket_table_alloc+0x3a/0x440 lib/rhashtable.c:176
 rhashtable_rehash_alloc+0x6b/0x120 lib/rhashtable.c:353
 rht_deferred_worker+0x18a/0x1b20 lib/rhashtable.c:413
 process_one_work+0x864/0x1570 kernel/workqueue.c:2153
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Freed by task 3601:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 kvfree+0x59/0x60 mm/util.c:452
 rhashtable_free_and_destroy+0x15e/0x970 lib/rhashtable.c:1167
 ops_exit_list+0xa5/0x150 net/core/net_namespace.c:153
 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:554
 process_one_work+0x864/0x1570 kernel/workqueue.c:2153
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

The buggy address belongs to the object at ffff888054e68240
 which belongs to the cache kmalloc-8192 of size 8192
The buggy address is located 64 bytes inside of
 8192-byte region [ffff888054e68240, ffff888054e6a240)
The buggy address belongs to the page:
page:ffffea0001539a00 count:1 mapcount:0 mapping:ffff88813bff2080 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea000152ad08 ffffea0001539b08 ffff88813bff2080
raw: 0000000000000000 ffff888054e68240 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888054e68180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888054e68200: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
>ffff888054e68280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff888054e68300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888054e68380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/30 23:30 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in rhashtable_last_table
* Struck through repros no longer work on HEAD.