syzbot


UBSAN: undefined-behaviour in tcindex_set_parms

Status: fixed on 2021/02/22 13:06
Reported-by: syzbot+bb2884ea19df6e413901@syzkaller.appspotmail.com
Fix commit: 22c1b22672f3 net_sched: avoid shift-out-of-bounds in tcindex_set_parms()
First crash: 1283d, last: 1168d
Fix bisection: fixed by (bisect log) :
commit 22c1b22672f3c56289ea91cf5eaffa61db3e4b2e
Author: Eric Dumazet <edumazet@google.com>
Date: Thu Jan 14 18:52:29 2021 +0000

  net_sched: avoid shift-out-of-bounds in tcindex_set_parms()

  
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2021/02/22 09:10 3h07m bisect fix linux-4.19.y job log (1)
2021/02/18 17:34 19m bisect fix linux-4.19.y error job log (0)
2021/02/14 07:54 0m bisect fix linux-4.19.y error job log (0)
2021/01/15 07:27 27m bisect fix linux-4.19.y job log (0) log
2020/12/16 06:39 29m bisect fix linux-4.19.y job log (0) log
2020/11/16 06:11 28m bisect fix linux-4.19.y job log (0) log

Sample crash report:
audit: type=1400 audit(1602261224.713:8): avc:  denied  { execmem } for  pid=6490 comm="syz-executor976" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
================================================================================
UBSAN: Undefined behaviour in net/sched/cls_tcindex.c:238:29
shift exponent 44 is too large for 32-bit type 'int'
CPU: 0 PID: 6492 Comm: syz-executor976 Not tainted 4.19.150-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+0x22c/0x33e lib/dump_stack.c:118
 ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
 __ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
 valid_perfect_hash net/sched/cls_tcindex.c:238 [inline]
 tcindex_set_parms.cold+0x170/0x22f net/sched/cls_tcindex.c:398
 tcindex_change+0x220/0x2f3 net/sched/cls_tcindex.c:518
 tc_new_tfilter+0xb38/0x1570 net/sched/cls_api.c:1320
 rtnetlink_rcv_msg+0x498/0xc10 net/core/rtnetlink.c:4778
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x717/0xcc0 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc7/0x130 net/socket.c:632
 ___sys_sendmsg+0x7bb/0x8f0 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/0x670 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441629
Code: e8 fc ab 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 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff6220c2c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441629
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 000000000000bf1a R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000020000080 R11: 0000000000000246 R12: 00000000004023d0
R13: 0000000000402460 R14: 0000000000000000 R15: 0000000000000000
================================================================================
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
nla_parse: 740 callbacks suppressed
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
nla_parse: 831 callbacks suppressed
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.
netlink: 4 bytes leftover after parsing attributes in process `syz-executor976'.

Crashes (39):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/09 16:35 linux-4.19.y a1b977b49b66 fa79ed2a .config console log report syz C ci2-linux-4-19
2020/09/22 05:28 linux-4.19.y 015e94d0e37b 9e1fa68e .config console log report syz C ci2-linux-4-19
2020/10/17 06:11 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 10:35 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 09:55 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/15 22:17 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/09 00:37 linux-4.19.y a1b977b49b66 92390980 .config console log report info ci2-linux-4-19
2020/10/03 18:13 linux-4.19.y b09c34517e1a 1a3f9408 .config console log report info ci2-linux-4-19
2020/10/03 05:39 linux-4.19.y b09c34517e1a 2653fa43 .config console log report info ci2-linux-4-19
2020/10/02 17:49 linux-4.19.y b09c34517e1a 062c9832 .config console log report info ci2-linux-4-19
2020/10/02 01:38 linux-4.19.y b09c34517e1a 9602ddf4 .config console log report info ci2-linux-4-19
2020/10/01 17:41 linux-4.19.y b09c34517e1a 4103fce0 .config console log report info ci2-linux-4-19
2020/10/01 07:34 linux-4.19.y 10ad6cfd5736 a9767fb2 .config console log report info ci2-linux-4-19
2020/10/01 07:13 linux-4.19.y 10ad6cfd5736 a9767fb2 .config console log report info ci2-linux-4-19
2020/09/30 04:53 linux-4.19.y 10ad6cfd5736 5abc3f1a .config console log report info ci2-linux-4-19
2020/09/29 11:56 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/09/29 10:53 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/09/29 06:43 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/09/29 05:56 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/09/29 03:16 linux-4.19.y 10ad6cfd5736 1b88c6d5 .config console log report info ci2-linux-4-19
2020/09/28 19:37 linux-4.19.y 10ad6cfd5736 6bfdbe89 .config console log report info ci2-linux-4-19
2020/09/28 13:13 linux-4.19.y 10ad6cfd5736 6bfdbe89 .config console log report info ci2-linux-4-19
2020/09/28 10:40 linux-4.19.y 10ad6cfd5736 6bfdbe89 .config console log report info ci2-linux-4-19
2020/09/28 07:24 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/28 02:23 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/27 21:25 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/27 13:05 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/27 05:41 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/27 05:13 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/27 03:45 linux-4.19.y 10ad6cfd5736 5dd8aee8 .config console log report info ci2-linux-4-19
2020/09/26 18:40 linux-4.19.y 10ad6cfd5736 2d5ea0cb .config console log report info ci2-linux-4-19
2020/09/25 22:53 linux-4.19.y d09b80172c22 4a006f63 .config console log report info ci2-linux-4-19
2020/09/25 22:26 linux-4.19.y d09b80172c22 4a006f63 .config console log report info ci2-linux-4-19
2020/09/25 14:55 linux-4.19.y d09b80172c22 4a006f63 .config console log report info ci2-linux-4-19
2020/09/23 22:39 linux-4.19.y d09b80172c22 54289b08 .config console log report info ci2-linux-4-19
2020/09/23 12:24 linux-4.19.y d09b80172c22 287cd75a .config console log report info ci2-linux-4-19
2020/09/23 12:24 linux-4.19.y d09b80172c22 287cd75a .config console log report info ci2-linux-4-19
2020/09/22 05:06 linux-4.19.y 015e94d0e37b 9e1fa68e .config console log report info ci2-linux-4-19
2020/09/22 05:06 linux-4.19.y 015e94d0e37b 9e1fa68e .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.