KASAN: stack-out-of-bounds Read in tcf_action_destroy

4 views
Skip to first unread message

syzbot

unread,
Oct 6, 2020, 5:53:15 PM10/6/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cbfa1702 Linux 4.14.198
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12792daf900000
kernel config: https://syzkaller.appspot.com/x/.config?x=3990958d85b55e59
dashboard link: https://syzkaller.appspot.com/bug?extid=34eb37c79e51c20ea35e
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c618e7900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13cc39c0500000

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

netlink: 32 bytes leftover after parsing attributes in process `syz-executor848'.
netlink: 32 bytes leftover after parsing attributes in process `syz-executor848'.
netlink: 32 bytes leftover after parsing attributes in process `syz-executor848'.
netlink: 32 bytes leftover after parsing attributes in process `syz-executor848'.
==================================================================
BUG: KASAN: stack-out-of-bounds in tcf_action_destroy+0x138/0x170 net/sched/act_api.c:526
Read of size 8 at addr ffff888097c777a0 by task syz-executor848/6394

CPU: 0 PID: 6394 Comm: syz-executor848 Not tainted 4.14.198-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x283 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
tcf_action_destroy+0x138/0x170 net/sched/act_api.c:526
tcf_action_init+0x294/0x400 net/sched/act_api.c:769
tcf_action_add net/sched/act_api.c:1079 [inline]
tc_ctl_action+0x2e3/0x50f net/sched/act_api.c:1131
rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316
netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433
netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline]
netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313
netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:656
___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
__sys_sendmsg+0xa3/0x120 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2103
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x446c19
RSP: 002b:00007f335551ed98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446c19
RDX: 0000000000000000 RSI: 0000000020002980 RDI: 0000000000000003
RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 0001008400000000 R14: 0000000000e60000 R15: 053b003000000098

The buggy address belongs to the page:
page:ffffea00025f1dc0 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0xfffe0000000000()
raw: 00fffe0000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: 0000000000000000 0000000100000001 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888097c77680: 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3
ffff888097c77700: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888097c77780: f1 f1 f1 f1 f1 f1 00 00 f2 f2 00 00 00 00 00 f3
^
ffff888097c77800: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffff888097c77880: f1 f1 f1 f1 f1 f1 00 00 00 00 00 00 f3 f3 f3 f3
==================================================================


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