Message ID | 1704454040-11017-7-git-send-email-yifeid@nvidia.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T61S438DNz1yP5 for <incoming@patchwork.ozlabs.org>; Fri, 5 Jan 2024 22:28:52 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1rLiNR-0005Z1-GU; Fri, 05 Jan 2024 11:28:37 +0000 Received: from mail-bn8nam12on2061.outbound.protection.outlook.com ([40.107.237.61] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <yifeid@nvidia.com>) id 1rLiMi-0004t5-U8 for kernel-team@lists.ubuntu.com; Fri, 05 Jan 2024 11:27:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UPoi/fFysdICX0+IjsD/odwST0Ag7s7YheE50nCzG1zV55zDrM0txl7BMlCuDdxgj27aQn3kyNXDGya8UWovJjYqVqBOTGwx94FT5c/RZfJnKMJtPuG8JMG0vQZjHM3qOJ2o/nokH7/jqk43QgXfJFcWW5P/beoqnrWQ8ZsuTQGOdJ0jIDUepp4URlcj6qyFiAXqnJztd9uB24uvvRkiJWgfeaxWtfk1UVynKgOwrsf+6Pk0v3ZADdi6dXySGubFond7CCvWUQMwv63OSkOjqtj1nm7fUcElKgEhk5pWf6oAifswYJNQ7yQE7NRQ+0YmsXSPDw9MDGyvKTBU4tbOUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xhKKqzBfAPnjsIxu9LkcX2Xl3UfQAFxiAI9gos42VHQ=; b=I+K8Jnlj4h67wXe/uEBYfyfne1GD+WpLSHfWr9HRI6Bf/5gvXgjw3VwotmqRW4Z7w3Z3uzdyW08QryhI0yBAZlB0dZRzAv//JMfR2FhR5P+9Krawg6ruyH8eF6cKm50zW3JE3HKY1IvlcgktBeKn52IkThjCNLr0ugN22L1aJ8ZF5q2DpUldmvlGewm8nHrOYasaVuBgNuEthuRlZ5zSA6aPQIerFxkMPZJu+yNkn6bRBgA60j2lTt5w1TiGHq38JcXC5ksJcTfvrVcWwxSBbFt04cjZq5U7WYloVjsK4i2Am2gaRJVJKRqTG4vBzIzgfgLeIIC3CHP6oxJaiKNUIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=canonical.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from SJ2PR07CA0020.namprd07.prod.outlook.com (2603:10b6:a03:505::19) by CH3PR12MB7594.namprd12.prod.outlook.com (2603:10b6:610:140::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.14; Fri, 5 Jan 2024 11:27:48 +0000 Received: from MWH0EPF000989E5.namprd02.prod.outlook.com (2603:10b6:a03:505:cafe::5c) by SJ2PR07CA0020.outlook.office365.com (2603:10b6:a03:505::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.16 via Frontend Transport; Fri, 5 Jan 2024 11:27:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by MWH0EPF000989E5.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Fri, 5 Jan 2024 11:27:48 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 5 Jan 2024 03:27:36 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 5 Jan 2024 03:27:36 -0800 Received: from mtl123.mtl.labs.mlnx (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Fri, 5 Jan 2024 03:27:36 -0800 Received: from sw-mtx-008.mtx.labs.mlnx. (sw-mtx-008.mtx.labs.mlnx [10.9.150.35]) by mtl123.mtl.labs.mlnx (8.14.4/8.14.4) with ESMTP id 405BRK0u014036; Fri, 5 Jan 2024 13:27:32 +0200 From: Tony Duan <yifeid@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][J:linux-bluefield][PATCH v2 6/6] net: xfrm: Fix xfrm_address_filter OOB read Date: Fri, 5 Jan 2024 05:27:20 -0600 Message-ID: <1704454040-11017-7-git-send-email-yifeid@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1704454040-11017-1-git-send-email-yifeid@nvidia.com> References: <1704454040-11017-1-git-send-email-yifeid@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E5:EE_|CH3PR12MB7594:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dde910f-7f49-4d07-1a5c-08dc0de158a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RCbRmRf57cJS1v6A5SV3P00Go3IELH3pCNHX3A6VaYwjyHuKZaaEyEFv6jwCxjjey5MagwTYR8jFv/66JUTzNLwiEhVfA4+4r5s5NsqtxYIi+3Sr5NZOKdP5ug7YEBSA8voHyw0uiIWC2CXTkA/hyAX0VmE0vcdBMPz4plIRD1BOISlaYimMbBlkscS3Wk/dwkh8+uq5izOXU6S0W3PqJKtOuP8c5v3x5yu9t8ewookm/F4sFxuSunT7K7hXqrl6VnboU35hAFpru3KZNNEj3svZeyFcrf6+8pH4CCtqCZbjb3oknHJPPljBZYa8B2W02wDfru/mVH2sODtjAe7oNIf4svz8Kg5GOgK4A4u4SrybMLF4o/Yh9CDep1tzrhNCTPIfiYJ+Pp8udD9iE6cHDphUXx7aPF4Cy1P9sw1n6+rLCgfgNHVn0VZIWTcX1pUbDX0fVZNlbIyZBbi+kfgvoIVn2D2oEs25sK9+OCdvnUW3gZQwWZDvCkVeudwXbJzjOIVRxwPk6pBy8lKXrZ1CPu7ZRwPFeEEJRyiJYlMCtBkZboUfFUnFVMONyRqlSVrUxHjKTcIpzzP6xNlrJUEUpnNoOKZ6JVjkf3JP5hlCqXMShs+FCxqBn7qhRKEKaCFWgCbzPbrdU3jTegEoi73zRHLK/MxMBO5UDuajjump1YYa6x4s5HJDXxUs2c4i5DoSrphCrUaFn8F5NJzq+xB5aOu6D6++N5x21o9TL6ROM/5ajjeyny8uEk7zyr8xfLYpCq9RXu1bA3rGaDBppjPBjw== X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(136003)(39860400002)(396003)(376002)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799012)(40470700004)(46966006)(36840700001)(2906002)(5660300002)(8676002)(8936002)(4326008)(316002)(70586007)(6916009)(54906003)(2616005)(336012)(36860700001)(26005)(83380400001)(84970400001)(40480700001)(40460700003)(47076005)(41300700001)(70206006)(82740400003)(7636003)(356005)(36756003)(86362001)(6666004)(478600001)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2024 11:27:48.4807 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9dde910f-7f49-4d07-1a5c-08dc0de158a2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989E5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7594 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Cc: vlad@nvidia.com, dann.frazier@canonical.com, bodong@nvidia.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Kernel panic in restart driver after configuring IPsec full offload
|
expand
|
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 5e2988b..2b720a9 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1167,6 +1167,15 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) sizeof(*filter), GFP_KERNEL); if (filter == NULL) return -ENOMEM; + + /* see addr_match(), (prefix length >> 5) << 2 + * will be used to compare xfrm_address_t + */ + if (filter->splen > (sizeof(xfrm_address_t) << 3) || + filter->dplen > (sizeof(xfrm_address_t) << 3)) { + kfree(filter); + return -EINVAL; + } } if (attrs[XFRMA_PROTO])