Eric Dumazet
df4646250f
net_sched: reject silly cell_log in qdisc_get_rtab()
...
commit e4bedf48aaa5552bc1f49703abd17606e7e6e82a upstream.
iproute2 probably never goes beyond 8 for the cell exponent,
but stick to the max shift exponent for signed 32bit.
UBSAN reported:
UBSAN: shift-out-of-bounds in net/sched/sch_api.c:389:22
shift exponent 130 is too large for 32-bit type 'int'
CPU: 1 PID: 8450 Comm: syz-executor586 Not tainted 5.11.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x183/0x22e lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:148 [inline]
__ubsan_handle_shift_out_of_bounds+0x432/0x4d0 lib/ubsan.c:395
__detect_linklayer+0x2a9/0x330 net/sched/sch_api.c:389
qdisc_get_rtab+0x2b5/0x410 net/sched/sch_api.c:435
cbq_init+0x28f/0x12c0 net/sched/sch_cbq.c:1180
qdisc_create+0x801/0x1470 net/sched/sch_api.c:1246
tc_modify_qdisc+0x9e3/0x1fc0 net/sched/sch_api.c:1662
rtnetlink_rcv_msg+0xb1d/0xe60 net/core/rtnetlink.c:5564
netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2494
netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1330
netlink_sendmsg+0xaa6/0xe90 net/netlink/af_netlink.c:1919
sock_sendmsg_nosec net/socket.c:652 [inline]
sock_sendmsg net/socket.c:672 [inline]
____sys_sendmsg+0x5a2/0x900 net/socket.c:2345
___sys_sendmsg net/socket.c:2399 [inline]
__sys_sendmsg+0x319/0x400 net/socket.c:2432
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Cong Wang <cong.wang@bytedance.com>
Link: https://lore.kernel.org/r/20210114160637.1660597-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27 11:05:43 +01:00
..
2019-10-29 09:19:39 +01:00
2019-09-10 10:33:39 +01:00
2020-07-22 09:32:00 +02:00
2020-07-22 09:32:00 +02:00
2019-09-10 10:33:39 +01:00
2019-09-10 10:33:39 +01:00
2019-09-10 10:33:39 +01:00
2017-12-13 13:18:46 -05:00
2017-10-12 22:13:20 -07:00
2017-12-13 13:18:46 -05:00
2020-01-27 14:51:18 +01:00
2019-09-10 10:33:39 +01:00
2019-12-01 09:16:06 +01:00
2019-09-10 10:33:39 +01:00
2019-10-05 13:09:28 +02:00
2019-09-10 10:33:39 +01:00
2020-07-22 09:32:00 +02:00
2019-09-10 10:33:39 +01:00
2020-10-29 09:54:58 +01:00
2019-09-10 10:33:39 +01:00
2020-07-22 09:32:00 +02:00
2020-02-01 09:37:06 +00:00
2020-02-01 09:37:06 +00:00
2018-05-24 22:56:15 -04:00
2020-07-22 09:32:00 +02:00
2020-07-22 09:32:00 +02:00
2020-02-01 09:37:06 +00:00
2020-02-24 08:34:34 +01:00
2020-04-02 15:28:11 +02:00
2020-02-11 04:33:52 -08:00
2021-01-27 11:05:43 +01:00
2020-02-01 09:37:06 +00:00
2020-07-22 09:32:00 +02:00
2018-02-21 13:15:33 -05:00
2020-07-22 09:32:00 +02:00
2018-01-24 14:52:40 -05:00
2020-02-01 09:37:05 +00:00
2018-07-24 14:44:00 -07:00
2018-07-24 14:44:00 -07:00
2021-01-27 11:05:43 +01:00
2020-07-22 09:31:59 +02:00
2018-06-17 08:42:33 +09:00
2020-07-22 09:32:00 +02:00
2019-10-07 18:57:26 +02:00
2020-04-02 15:28:11 +02:00
2021-01-12 20:10:20 +01:00
2019-08-09 17:52:32 +02:00
2017-12-21 12:32:51 -05:00
2020-07-22 09:32:00 +02:00
2020-04-29 16:31:21 +02:00
2017-12-21 12:32:51 -05:00
2020-05-14 07:57:17 +02:00
2020-03-18 07:14:16 +01:00
2020-11-18 19:18:53 +01:00
2021-01-12 20:10:20 +01:00
2018-06-23 10:58:46 +09:00
2019-11-10 11:27:54 +01:00
2018-06-24 16:42:46 +09:00
2018-01-17 14:53:57 -05:00
2019-12-21 10:57:12 +01:00
2019-12-21 10:57:12 +01:00
2019-12-05 09:21:32 +01:00
2020-11-05 11:08:33 +01:00
2017-12-21 12:32:50 -05:00
2017-12-21 12:32:50 -05:00
2020-01-12 12:17:29 +01:00
2017-12-21 12:32:51 -05:00
2021-01-12 20:10:20 +01:00
2019-11-10 11:27:54 +01:00
2021-01-12 20:10:20 +01:00
2020-05-14 07:57:17 +02:00
2018-05-18 13:52:32 -04:00
2020-07-22 09:32:00 +02:00