KASAN: null-ptr-deref Read in __tcf_idr_release

17 views
Skip to first unread message

syzbot

unread,
Jan 28, 2020, 9:22:10 AM1/28/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 88d6de67 Linux 4.19.99
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10c6605ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bbdca1178922fa69
dashboard link: https://syzkaller.appspot.com/bug?extid=c241d0cd220fe5308b96
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=114811a5e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12ac51f1e00000

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

audit: type=1400 audit(1580221102.082:35): avc: denied { map } for pid=7987 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
audit: type=1400 audit(1580221141.532:36): avc: denied { map } for pid=7999 comm="syz-executor463" path="/root/syz-executor463020308" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
==================================================================
BUG: KASAN: null-ptr-deref in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
BUG: KASAN: null-ptr-deref in __tcf_idr_release+0x92/0xf0 net/sched/act_api.c:139
Read of size 4 at addr 0000000000000010 by task syz-executor463/8009

CPU: 0 PID: 8009 Comm: syz-executor463 Not tainted 4.19.99-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+0x197/0x210 lib/dump_stack.c:118
kasan_report_error mm/kasan/report.c:352 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x199/0x2ba mm/kasan/report.c:396
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
__tcf_idr_release+0x92/0xf0 net/sched/act_api.c:139
tcf_del_walker net/sched/act_api.c:266 [inline]
tcf_generic_walker+0x6c6/0xa60 net/sched/act_api.c:292
tcf_ife_walker+0x1a5/0x2b0 net/sched/act_ife.c:862
tca_action_flush net/sched/act_api.c:1142 [inline]
tca_action_gd+0x945/0x1690 net/sched/act_api.c:1248
tc_ctl_action+0x297/0x43b net/sched/act_api.c:1377
rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:4768
netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454
rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4786
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x53a/0x730 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xd7/0x130 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0x105/0x1d0 net/socket.c:2153
__do_sys_sendmsg net/socket.c:2162 [inline]
__se_sys_sendmsg net/socket.c:2160 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446939
Code: e8 0c e8 ff ff 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 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f47b7a69da8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446939
RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 00000000006dbc20 R08: 0000000000000008 R09: 0000000000000000
R10: 000000000000000c R11: 0000000000000246 R12: 00000000006dbc2c
R13: 0000000020000400 R14: 00000000004ae7e8 R15: 000000000000002d
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages