From patchwork Fri Feb 18 04:25:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 12750950 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 B9301C433F5 for ; Fri, 18 Feb 2022 04:26:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbiBRE0X (ORCPT ); Thu, 17 Feb 2022 23:26:23 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbiBRE0W (ORCPT ); Thu, 17 Feb 2022 23:26:22 -0500 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F1D11409E for ; Thu, 17 Feb 2022 20:26:02 -0800 (PST) Received: by codeconstruct.com.au (Postfix, from userid 10000) id 4270A202C6; Fri, 18 Feb 2022 12:25:56 +0800 (AWST) From: Jeremy Kerr To: netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Matt Johnston Subject: [PATCH net-next 0/2] Add checks for incoming packet addresses Date: Fri, 18 Feb 2022 12:25:52 +0800 Message-Id: <20220218042554.564787-1-jk@codeconstruct.com.au> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This series adds a couple of checks for valid addresses on incoming MCTP packets. We introduce a couple of helpers in 1/2, and use them in the ingress path in 2/2. Cheers, Jeremy --- Jeremy Kerr (2): mctp: replace mctp_address_ok with more fine-grained helpers mctp: add address validity checking for packet receive include/net/mctp.h | 12 +++++++++++- net/mctp/device.c | 2 +- net/mctp/neigh.c | 2 +- net/mctp/route.c | 13 ++++++++++++- 4 files changed, 25 insertions(+), 4 deletions(-)