From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A8D5C433E0 for ; Mon, 28 Dec 2020 23:01:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0DE06222BB for ; Mon, 28 Dec 2020 23:01:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730668AbgL1XAo (ORCPT ); Mon, 28 Dec 2020 18:00:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730482AbgL1XAh (ORCPT ); Mon, 28 Dec 2020 18:00:37 -0500 Received: from mail.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72772C0613D6; Mon, 28 Dec 2020 14:54:44 -0800 (PST) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) by mail.monkeyblade.net (Postfix) with ESMTPSA id 93CCF4CE93100; Mon, 28 Dec 2020 14:54:01 -0800 (PST) Date: Mon, 28 Dec 2020 14:54:01 -0800 (PST) Message-Id: <20201228.145401.2067471886598959966.davem@davemloft.net> To: rdunlap@infradead.org Cc: linux-kernel@vger.kernel.org, syzbot+97c5bd9cc81eca63d36e@syzkaller.appspotmail.com, nogahf@mellanox.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, netdev@vger.kernel.org, kuba@kernel.org Subject: Re: [PATCH -net] net: sched: prevent invalid Scell_log shift count From: David Miller In-Reply-To: <20201225062344.32566-1-rdunlap@infradead.org> References: <20201225062344.32566-1-rdunlap@infradead.org> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.monkeyblade.net [0.0.0.0]); Mon, 28 Dec 2020 14:54:01 -0800 (PST) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Randy Dunlap Date: Thu, 24 Dec 2020 22:23:44 -0800 > Check Scell_log shift size in red_check_params() and modify all callers > of red_check_params() to pass Scell_log. > > This prevents a shift out-of-bounds as detected by UBSAN: > UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22 > shift exponent 72 is too large for 32-bit type 'int' > > Fixes: 8afa10cbe281 ("net_sched: red: Avoid illegal values") > Signed-off-by: Randy Dunlap > Reported-by: syzbot+97c5bd9cc81eca63d36e@syzkaller.appspotmail.com Applied and queued up for -stable, thanks.