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

4 views
Skip to first unread message

syzbot

unread,
Jul 30, 2022, 7:30:23 PM7/30/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14a24fda080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=c25ee831321ec361320b
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c25ee8...@syzkaller.appspotmail.com

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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Nov 27, 2022, 6:30:35 PM11/27/22
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages