Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5476739rwb; Tue, 1 Aug 2023 03:19:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlExrOnpagICSGGlU5+d9hG8BnzIlI0qDI/TBpFoTSMfWdVA+8YlllXMQC8PpujQViOF4t5E X-Received: by 2002:a05:6a21:3d8d:b0:12f:1d09:f1c3 with SMTP id bj13-20020a056a213d8d00b0012f1d09f1c3mr11266167pzc.54.1690885154263; Tue, 01 Aug 2023 03:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690885154; cv=none; d=google.com; s=arc-20160816; b=Br2BZHm4JoB3BDzTxGg9f0Q3W8r5MIZV+fDkKGaHNvwHvyPGsfb5xW3aCXT4kNDKfY 31k1acTEQPn1nhcxZp4jEIpq8aAp6420nwM2remyd09GFlFQEybVwjGQwiBgBoyn59eS cx0OEiDY0wrpIXXckUMQgvNNIKK+ksqbWKfngHXIXG3Z4gN+hq1V0oI15PCk/3oLZ0Qo y2rXoMybJ5JvMEYrasGVbKobf62Wl1FAzk3bP2YF6yfQIVn964Ha+4X8XTSmUf5T2fm+ hFWTdDI4jYuRdu9YPlvloA206ebC5cnLzMmz30auIKzNq7IAzr3AuBoGCERyqpG94TiL aK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=0Q3SUVyG2sA81x/ychwJ5ySld4b7DUvp+HiKQcdmyPQ=; fh=naOymOcD7UglpGiV6ZlSRLufuGrFCnH6A5Ra3287drA=; b=foubNC+AsywrLsLGub4Qp6yaZ1xfEuCLcQL40HW9FYFkrvONWrHN7X5GARY1s0VgyI fyrQSWncRWWYmY/E+FgJlzVktRNyX/TYdGZlpkPYhGEpkGTsGaiGcDAyw41BDjLF2UBL CH5t1EZdAbBRdyHZ6ReBNTANnCDEjn2pwMBdc+8DpN2rwdDE76dPFQpigQZSUKRZTu3/ 04rklst1vBKhnV11HUSTioET7iKZn1Ggc4pzN4YCWnHARcjMPRxbb36s5BSbN4mXZ6Xt bS+J4/yXIhnTm4GdOmIn7eH4L7yYa9FkGAngXUj+loyEAmYRAuKBImpX4s+KxFeUbURv 8k4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r26-20020a638f5a000000b00564438ef563si3522598pgn.766.2023.08.01.03.18.59; Tue, 01 Aug 2023 03:19:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233800AbjHAJ7t (ORCPT + 99 others); Tue, 1 Aug 2023 05:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233772AbjHAJ7b (ORCPT ); Tue, 1 Aug 2023 05:59:31 -0400 Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D192185; Tue, 1 Aug 2023 02:59:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 2385C2065A; Tue, 1 Aug 2023 11:59:26 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QOUV8rQq0dN5; Tue, 1 Aug 2023 11:59:25 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 3F8D020561; Tue, 1 Aug 2023 11:59:25 +0200 (CEST) Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 392D080004A; Tue, 1 Aug 2023 11:59:25 +0200 (CEST) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 1 Aug 2023 11:59:25 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 1 Aug 2023 11:59:24 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 6E2CA3182AA1; Tue, 1 Aug 2023 11:59:24 +0200 (CEST) Date: Tue, 1 Aug 2023 11:59:24 +0200 From: Steffen Klassert To: Lin Ma CC: , , , , , , Subject: Re: [PATCH v2] xfrm: add NULL check in xfrm_update_ae_params Message-ID: References: <20230721145103.2714073-1-linma@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230721145103.2714073-1-linma@zju.edu.cn> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 21, 2023 at 10:51:03PM +0800, Lin Ma wrote: > Normally, x->replay_esn and x->preplay_esn should be allocated at > xfrm_alloc_replay_state_esn(...) in xfrm_state_construct(...), hence the > xfrm_update_ae_params(...) is okay to update them. However, the current > implementation of xfrm_new_ae(...) allows a malicious user to directly > dereference a NULL pointer and crash the kernel like below. ... > This Null-ptr-deref bug is assigned CVE-2023-3772. And this commit > adds additional NULL check in xfrm_update_ae_params to fix the NPD. > > Fixes: d8647b79c3b7 ("xfrm: Add user interface for esn and big anti-replay windows") > Signed-off-by: Lin Ma Applied, thanks a lot!