UBSAN: undefined-behaviour in tcf_police_init

15 views
Skip to first unread message

syzbot

unread,
Sep 20, 2020, 9:54:15 PM9/20/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=119f90d3900000
kernel config: https://syzkaller.appspot.com/x/.config?x=243dd74ad58a8a57
dashboard link: https://syzkaller.appspot.com/bug?extid=dea15950ad33192f1733
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

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

netlink: 3092 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
================================================================================
UDF-fs: Scanning with blocksize 2048 failed
UBSAN: Undefined behaviour in net/sched/act_police.c:161:27
shift exponent 45 is too large for 32-bit type 'int'
CPU: 0 PID: 4081 Comm: syz-executor.5 Not tainted 4.19.146-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
tcf_police_init.cold+0x34/0x86 net/sched/act_police.c:161
tcf_action_init_1+0x962/0xc40 net/sched/act_api.c:870
tcf_action_init+0x2c3/0x490 net/sched/act_api.c:933
tcf_action_add+0xd9/0x360 net/sched/act_api.c:1314
tc_ctl_action+0x337/0x417 net/sched/act_api.c:1369
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+0x3b3/0x8f0 net/socket.c:2115
__sys_sendmmsg+0x195/0x470 net/socket.c:2210
__do_sys_sendmmsg net/socket.c:2239 [inline]
__se_sys_sendmmsg net/socket.c:2236 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45d5f9
Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8e59abbc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000027a80 RCX: 000000000045d5f9
RDX: 010efe10675dec16 RSI: 0000000020000200 RDI: 0000000000000003
RBP: 000000000118cf88 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c
R13: 00007ffd3b48548f R14: 00007f8e59abc9c0 R15: 000000000118cf4c
================================================================================
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
netlink: 32 bytes leftover after parsing attributes in process `syz-executor.5'.
could not allocate digest TFM handle mcryptd(crc32c)
netlink: 3092 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
could not allocate digest TFM handle mcryptd(crc32c)
netlink: 32 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
netlink: 3092 bytes leftover after parsing attributes in process `syz-executor.5'.
netlink: 32 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
netlink: 3092 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
netlink: 32 bytes leftover after parsing attributes in process `syz-executor.5'.
netlink: 3092 bytes leftover after parsing attributes in process `syz-executor.5'.
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
could not allocate digest TFM handle mcryptd(crc32c)
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
f2fs_msg: 90 callbacks suppressed
F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0x0)
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock
UDF-fs: Scanning with blocksize 512 failed
F2FS-fs (loop0): invalid crc value
could not allocate digest TFM handle mcryptd(crc32c)
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
F2FS-fs (loop0): SIT is corrupted node# 0 vs 1
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
F2FS-fs (loop0): Failed to initialize F2FS segment manager
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
F2FS-fs (loop0): Magic Mismatch, valid(0xf2f52010) - read(0x0)
F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock
F2FS-fs (loop0): invalid crc value
F2FS-fs (loop0): SIT is corrupted node# 0 vs 1
F2FS-fs (loop0): Failed to initialize F2FS segment manager
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
could not allocate digest TFM handle mcryptd(crc32c)
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
could not allocate digest TFM handle mcryptd(crc32c)
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop2): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: warning (device loop2): udf_fill_super: No fileset found


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

unread,
Sep 20, 2020, 10:08:16 PM9/20/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17e94173900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15c8a0d3900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1748c48d900000

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

netlink: 32 bytes leftover after parsing attributes in process `syz-executor754'.
netlink: 3092 bytes leftover after parsing attributes in process `syz-executor754'.
================================================================================
UBSAN: Undefined behaviour in net/sched/act_police.c:161:27
shift exponent 45 is too large for 32-bit type 'int'
CPU: 1 PID: 6476 Comm: syz-executor754 Not tainted 4.19.146-syzkaller #0
RIP: 0033:0x440389
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 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f

Reply all
Reply to author
Forward
0 new messages