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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BA4CC433EF for ; Fri, 22 Jul 2022 03:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233832AbiGVDRd (ORCPT ); Thu, 21 Jul 2022 23:17:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231274AbiGVDRa (ORCPT ); Thu, 21 Jul 2022 23:17:30 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D551B21AF; Thu, 21 Jul 2022 20:17:27 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oEj9r-003DMe-S0; Fri, 22 Jul 2022 13:16:57 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 22 Jul 2022 11:16:56 +0800 Date: Fri, 22 Jul 2022 11:16:56 +0800 From: Herbert Xu To: Abhishek Shah Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, steffen.klassert@secunet.com, linux-kernel@vger.kernel.org, Gabriel Ryan Subject: Re: Race 1 in net/xfrm/xfrm_algo.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2022 at 12:03:04PM -0400, Abhishek Shah wrote: > Dear Kernel Maintainers, > > We found a race in net/xfrm/xfrm_algo.c. The function *xfrm_probe_algs* updates > the availability field of items in a authentication algorithms list ( > *aalg_list* variable), but this update can occur simultaneously with > another invocation of *xfrm_probe_algs*, leading to double writes and > read/write consistency issues in scenarios where the *status* variable may > vary across the concurrent invocations of the function. This behavior also > occurs with another list with encryption algorithms (*ealg_list* variable) > as well as with the *xfrm_find_algo* function. We thought this is > undesirable given cryptographic logic errors often have security > implications. > > We provide more details below including the trace and reproducing > test cases. What inconsistency are you talking about? An algorithm can always disappear even if it was available earlier. Please state clearly why this is actually a problem rather than relying on some automated test whose results are useless without human interpretation. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt