general protection fault in tcf_ife_init

9 views
Skip to first unread message

syzbot

unread,
Jul 19, 2019, 6:26:07 PM7/19/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 3bd837bf Linux 4.19.59
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=155a8e58600000
kernel config: https://syzkaller.appspot.com/x/.config?x=cfa2f3bc2e9ff5d4
dashboard link: https://syzkaller.appspot.com/bug?extid=148745e1206447da2ee7
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1522cc78600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1774af84600000

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

audit: type=1400 audit(1563572661.038:36): avc: denied { map } for
pid=7819 comm="syz-executor660" path="/root/syz-executor660313468"
dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
netlink: 4 bytes leftover after parsing attributes in process
`syz-executor660'.
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7819 Comm: syz-executor660 Not tainted 4.19.59 #32
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:nla_parse_nested /./include/net/netlink.h:765 [inline]
RIP: 0010:tcf_ife_init+0x221/0x17d0 /net/sched/act_ife.c:487
Code: fb 48 c7 c2 99 43 81 85 be 01 00 00 00 48 c7 c7 60 da 79 88 e8 c0 26
d1 fb 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 48
89 d8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 83
RSP: 0018:ffff88808655eee0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff110107191ae
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000282
RBP: ffff88808655f068 R08: ffff8880838c8500 R09: 0000000000000001
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000001
R13: ffff88809ad84900 R14: ffff88808655f040 R15: 0000000000000001
FS: 000000000228e880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000180 CR3: 0000000089101000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tcf_action_init_1+0x804/0xc40 /net/sched/act_api.c:870
tcf_action_init+0x23e/0x360 /net/sched/act_api.c:933
tcf_action_add+0xe8/0x370 /net/sched/act_api.c:1313
tc_ctl_action+0x37a/0x46f /net/sched/act_api.c:1365
rtnetlink_rcv_msg+0x463/0xb00 /net/core/rtnetlink.c:4747
netlink_rcv_skb+0x17d/0x460 /net/netlink/af_netlink.c:2454
rtnetlink_rcv+0x1d/0x30 /net/core/rtnetlink.c:4765
netlink_unicast_kernel /net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x537/0x720 /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:0x4401d9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff7fc315e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401d9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a60
R13: 0000000000401af0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace a1043596925c57fd ]---
RIP: 0010:nla_parse_nested /./include/net/netlink.h:765 [inline]
RIP: 0010:tcf_ife_init+0x221/0x17d0 /net/sched/act_ife.c:487
Code: fb 48 c7 c2 99 43 81 85 be 01 00 00 00 48 c7 c7 60 da 79 88 e8 c0 26
d1 fb 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 48
89 d8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 83
RSP: 0018:ffff88808655eee0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff110107191ae
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000282
RBP: ffff88808655f068 R08: ffff8880838c8500 R09: 0000000000000001
R10: ffffed1015d04732 R11: ffff8880ae823993 R12: 0000000000000001
R13: ffff88809ad84900 R14: ffff88808655f040 R15: 0000000000000001
FS: 000000000228e880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000180 CR3: 0000000089101000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


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

syzbot

unread,
Jul 19, 2019, 6:54:07 PM7/19/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: aea8526e Linux 4.14.133
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10dcbed0600000
kernel config: https://syzkaller.appspot.com/x/.config?x=5dfccef5a159766b
dashboard link: https://syzkaller.appspot.com/bug?extid=3f1147988fa06c660c34
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13707d4c600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13085f84600000

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

netlink: 4 bytes leftover after parsing attributes in process
`syz-executor258'.
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7035 Comm: syz-executor258 Not tainted 4.14.133 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff888082d9a600 task.stack: ffff8880810a0000
RIP: 0010:nla_parse_nested /./include/net/netlink.h:765 [inline]
RIP: 0010:tcf_ife_init+0x1b3/0x1310 /net/sched/act_ife.c:462
RSP: 0018:ffff8880810a7230 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff110105b35ce
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000282
RBP: ffff8880810a7378 R08: ffff888082d9a600 R09: 0000000000000001
R10: 0000000000000000 R11: ffff888082d9a600 R12: 000000000000001f
R13: ffff88809b606dc0 R14: ffff8880810a7350 R15: 0000000000000000
FS: 0000000001b43880(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000180 CR3: 000000008e42d000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tcf_action_init_1+0x53c/0xaa0 /net/sched/act_api.c:682
tcf_action_init+0x2ab/0x480 /net/sched/act_api.c:751
tcf_action_add /net/sched/act_api.c:1078 [inline]
tc_ctl_action+0x32f/0x556 /net/sched/act_api.c:1126
rtnetlink_rcv_msg+0x3eb/0xb70 /net/core/rtnetlink.c:4285
netlink_rcv_skb+0x14f/0x3c0 /net/netlink/af_netlink.c:2432
rtnetlink_rcv+0x1d/0x30 /net/core/rtnetlink.c:4297
netlink_unicast_kernel /net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x45d/0x780 /net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 /net/netlink/af_netlink.c:1877
sock_sendmsg_nosec /net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 /net/socket.c:656
___sys_sendmsg+0x70a/0x840 /net/socket.c:2062
__sys_sendmsg+0xb9/0x140 /net/socket.c:2096
SYSC_sendmsg /net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 /net/socket.c:2103
do_syscall_64+0x1e8/0x640 /arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4401d9
RSP: 002b:00007ffe2d070148 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401d9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a60
R13: 0000000000401af0 R14: 0000000000000000 R15: 0000000000000000
Code: 76 fc 48 c7 c2 bb 01 e6 84 be 01 00 00 00 48 c7 c7 60 f5 78 87 e8 de
00 62 fc 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02
48 89 d8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85
RIP: nla_parse_nested /./include/net/netlink.h:765 [inline] RSP:
ffff8880810a7230
RIP: tcf_ife_init+0x1b3/0x1310 /net/sched/act_ife.c:462 RSP:
ffff8880810a7230
---[ end trace 8705b4ec58ff22f8 ]---

syzbot

unread,
Dec 2, 2019, 5:54:01 PM12/2/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit 7fcc60e5f837e7f626e08b486697017953e7e6a0
Author: Cong Wang <xiyou.w...@gmail.com>
Date: Tue Jul 23 04:43:00 2019 +0000

ife: error out when nla attributes are empty

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=111c7e41e00000
start commit: aea8526e Linux 4.14.133
git tree: linux-4.14.y
If the result looks correct, please mark the bug fixed by replying with:

#syz fix: ife: error out when nla attributes are empty

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Dec 3, 2019, 1:52:02 PM12/3/19
to syzkaller...@googlegroups.com
syzbot suspects this bug was fixed by commit:

commit c4c8899376c2eb363c70b0b200434cc9abd3d34e
Author: Cong Wang <xiyou.w...@gmail.com>
Date: Tue Jul 23 04:43:00 2019 +0000

ife: error out when nla attributes are empty

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11b27aeae00000
start commit: 3bd837bf Linux 4.19.59
git tree: linux-4.19.y
Reply all
Reply to author
Forward
0 new messages