KASAN: wild-memory-access Write in rhashtable_free_and_destroy

8 views
Skip to first unread message

syzbot

unread,
Nov 29, 2020, 7:02:24 AM11/29/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0c88e405 Linux 4.19.160
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1409d759500000
kernel config: https://syzkaller.appspot.com/x/.config?x=14b8a4cf9e8340fd
dashboard link: https://syzkaller.appspot.com/bug?extid=ec156c31f9cc392918ca
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13f3011d500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=115ee8d9500000

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

RDX: 0000000000000000 RSI: 00000000200006c0 RDI: 0000000000000003
RBP: 00007ffd6e2a6540 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
==================================================================
BUG: KASAN: wild-memory-access in atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
BUG: KASAN: wild-memory-access in __lock_acquire+0x251/0x3ff0 kernel/locking/lockdep.c:3307
Write of size 4 at addr dead000000000238 by task syz-executor726/8114

CPU: 0 PID: 8114 Comm: syz-executor726 Not tainted 4.19.160-syzkaller #0
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+0x1fc/0x2fe lib/dump_stack.c:118
kasan_report_error.cold+0x15b/0x1c7 mm/kasan/report.c:352
kasan_report+0x8f/0x96 mm/kasan/report.c:412
atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
__lock_acquire+0x251/0x3ff0 kernel/locking/lockdep.c:3307
lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0xd7/0x1260 kernel/locking/mutex.c:1072
rhashtable_free_and_destroy+0x41/0x970 lib/rhashtable.c:1147
mesh_table_free net/mac80211/mesh_pathtbl.c:72 [inline]
mesh_pathtbl_init+0xd9/0x100 net/mac80211/mesh_pathtbl.c:798
ieee80211_mesh_init_sdata+0x28e/0x550 net/mac80211/mesh.c:1461
ieee80211_setup_sdata+0xcbb/0xf70 net/mac80211/iface.c:1459
ieee80211_if_add+0xe19/0x17c0 net/mac80211/iface.c:1871
ieee80211_add_iface+0x99/0x160 net/mac80211/cfg.c:125
rdev_add_virtual_intf net/wireless/rdev-ops.h:45 [inline]
nl80211_new_interface+0x531/0x1570 net/wireless/nl80211.c:3268
genl_family_rcv_msg+0x642/0xc40 net/netlink/genetlink.c:602
genl_rcv_msg+0xbf/0x160 net/netlink/genetlink.c:627
netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
genl_rcv+0x24/0x40 net/netlink/genetlink.c:638
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115
__sys_sendmsg net/socket.c:2153 [inline]
__do_sys_sendmsg net/socket.c:2162 [inline]
__se_sys_sendmsg net/socket.c:2160 [inline]
__x64_sys_sendmsg+0x132/0x220 net/socket.c:2160
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441889
Code: e8 5c ac 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 1b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd6e2a6528 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441889
RDX: 0000000000000000 RSI: 00000000200006c0 RDI: 0000000000000003
RBP: 00007ffd6e2a6540 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
==================================================================


---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages