From patchwork Mon Dec 26 18:09:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Zhandarovich X-Patchwork-Id: 13081925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAD51C46467 for ; Mon, 26 Dec 2022 18:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231845AbiLZSLS (ORCPT ); Mon, 26 Dec 2022 13:11:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbiLZSLQ (ORCPT ); Mon, 26 Dec 2022 13:11:16 -0500 Received: from exchange.fintech.ru (e10edge.fintech.ru [195.54.195.159]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C1B3C2F; Mon, 26 Dec 2022 10:11:13 -0800 (PST) Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.169) with Microsoft SMTP Server (TLS) id 14.3.498.0; Mon, 26 Dec 2022 21:09:56 +0300 Received: from localhost (10.0.253.157) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 26 Dec 2022 21:09:56 +0300 From: Nikita Zhandarovich To: , Greg Kroah-Hartman CC: Nikita Zhandarovich , =?utf-8?b?RGltYcK3Q2h1?= =?utf-8?b?bWFrwrc=?= , Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Jakub Kicinski , , , , Subject: [PATCH 5.10 0/1] net/mlx5e: Fix nullptr in mlx5e_tc_add_fdb_flow() Date: Mon, 26 Dec 2022 10:09:49 -0800 Message-ID: <20221226180950.86129-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.0.253.157] X-ClientProxiedBy: Ex16-01.fintech.ru (10.0.10.18) To Ex16-01.fintech.ru (10.0.10.18) Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The result of __dev_get_by_index() is not checked for NULL, which then passed to mlx5e_attach_encap() and gets dereferenced. This patch backports commit to correct the issue in 5.10 branch. Found by Linux Verification Center (linuxtesting.org) with SVACE.