Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5806782rwl; Tue, 4 Apr 2023 04:04:57 -0700 (PDT) X-Google-Smtp-Source: AKy350b6CO/FglNsHOg/UfNc8atXJfklt5YrOVkv2e/+JJWQnvg/cSG/T/tsbkmTzw/nZGj9o+zX X-Received: by 2002:a17:906:a5a:b0:878:481c:c49b with SMTP id x26-20020a1709060a5a00b00878481cc49bmr1968463ejf.1.1680606297219; Tue, 04 Apr 2023 04:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680606297; cv=none; d=google.com; s=arc-20160816; b=zLG5PPIRSgakm6hz7YYbArlDYR+7FfnZIqjjezlwIar92yfMyb8FBar3L4hE4DpPZt J0XZHcpu3uWjX31ds5V8urjWFrTbLDUu0rDhr69WunF5SgDTdfs+J83g3g9DPnptMwzV Bi5XN6GJ7JSi5k9EvgjhRD232gh+wPV92QIpVZA82efdF0nH5KjbpX7pbLHV6tJ7biPq wsAOA/ysxzd0uqFEIv65gJOD+jCQp8Df/kXKgRS89hnY0a86LdMPHhfhr6IQopKjMy1N 3rnrcP0wWBzlsnE6BCPAboW0n3hgc4vmFkSZSQwK8YHKv9ozJEWxiRCdCWJyF6Tw7Duv VbnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=N20wGVAgj/RdgY8xQo+Kk/V3SlKQkQsiIHsHYJVcffE=; b=aM2QSG4Ce7422/GYcV66tsDQ0LQ8JQ05VgeKK5AwZJJplE/e3/2ov2YQmal5zJqYtX V+ygnO1g/yJpf2e1VOCcYuARVv2GPAOTZyOt1AFJNhckVPytdGQa6EbOtKsOVq65m28B 08wQhl+xZMHInLamGjxhzDQcupzd8RaAVt7KKBfmOehJy4Ou+V8NsMu0VSCjiOO6uoqG 8M8eyqsOafmAlGpC5Gv5R9omjAQU9Tt4mosFP5PHtJ2r3rVU/+FsXMpX8yCqm+5DpYNm EW75KQkbEUCTvRwy0i9mZh9OeMjLsNa67G7VaSTJJ+yJuZdd4SiO3ZUN7lTvwPE2oR8C +kEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y5CPwwtl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h24-20020a1709067cd800b0093b6e51aba2si2452183ejp.199.2023.04.04.04.04.25; Tue, 04 Apr 2023 04:04:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y5CPwwtl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234886AbjDDK7Q (ORCPT + 99 others); Tue, 4 Apr 2023 06:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234943AbjDDK67 (ORCPT ); Tue, 4 Apr 2023 06:58:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5034749F5 for ; Tue, 4 Apr 2023 03:56:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 313DF631CD for ; Tue, 4 Apr 2023 10:54:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 372C3C433D2; Tue, 4 Apr 2023 10:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680605688; bh=h4+T8Imo6qOzgIGs1Wpe6DpxZFIpYM3IVGTeUhccZxI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Y5CPwwtl7NCxAhlla87HLCnCNszDio2OB/NUr3hRTL9Gj+4r2inoT5KKLJHR8rraZ ryYvTtR3XPyJy7DS7lNAb53cKqmWL9zqKktzn7zfTOZ0sJdNplyUBtw7GgHw3Ad7X7 mu4td30NFuDirmvJRgVFhSv0Vh/zG58yLigo8gOeCCEUMxZdEluni94K1X1DyuPGKi xz8PgSI6CDtfc92iRQBEn+38+qoqh3gZ3imSi88I9cjEQpwd2HOv5ThRQSJeVxDll/ W+7Cebet0KYX/FLyyAoXuLnoyZbyE0UeAbYff0FhG+gxJ4qDvaQ3Jgrc7ds+DM89vP 2u+V7JPXf53Tw== Message-ID: Subject: Re: [PATCH] NFSD: callback request does not use correct credential for AUTH_SYS From: Jeff Layton To: Dai Ngo , chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org Date: Tue, 04 Apr 2023 06:54:46 -0400 In-Reply-To: <1680380528-22306-1-git-send-email-dai.ngo@oracle.com> References: <1680380528-22306-1-git-send-email-dai.ngo@oracle.com> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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-nfs@vger.kernel.org On Sat, 2023-04-01 at 13:22 -0700, Dai Ngo wrote: > Currently callback request does not use the credential specified in > CREATE_SESSION if the security flavor for the back channel is AUTH_SYS. >=20 > Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error: > DELEG5 st_delegation.testCBSecParms : FAILURE > expected callback with uid, gid =3D=3D 17, 19, got 0, 0 >=20 > Signed-off-by: Dai Ngo > --- > fs/nfsd/nfs4callback.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c > index 2a815f5a52c4..4039ffcf90ba 100644 > --- a/fs/nfsd/nfs4callback.c > +++ b/fs/nfsd/nfs4callback.c > @@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct= nfs4_client *clp, struct r > if (!kcred) > return NULL; > =20 > - kcred->uid =3D ses->se_cb_sec.uid; > - kcred->gid =3D ses->se_cb_sec.gid; > + kcred->fsuid =3D ses->se_cb_sec.uid; > + kcred->fsgid =3D ses->se_cb_sec.gid; > return kcred; > } > } Reviewed-by: Jeff Layton