Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2728663rwl; Sat, 1 Apr 2023 13:30:46 -0700 (PDT) X-Google-Smtp-Source: AKy350bk4XL+odIaTgT/DSbIXvtb56v435kXzVr4oVunPrEhPXHG2zfBOlPsWI4KzX6xP3bflYcM X-Received: by 2002:a17:90b:1e4f:b0:23f:10ee:feef with SMTP id pi15-20020a17090b1e4f00b0023f10eefeefmr35398932pjb.19.1680381046610; Sat, 01 Apr 2023 13:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680381046; cv=none; d=google.com; s=arc-20160816; b=oepdKhj0fGmAyzuwSt/OiJbUwExv45vK0fSnX7iwycw4cE55xZOVPar9Kn5LFd8yTG QXpAQvQ3wEhL1FnQN6cjAlSbXssdA+DWlpSHdCF583woy9+sPwS5GbBaylA2fGa3s8IP DgoTAAUP6xa3NCWiKYPv+ktWh/EsdCMxc1t/1zJ4p7ye4lDkoC3xtdp1Ayx1o9wQl1jC dTT3R1MRWQWjcEeVKGlR/qxx00UOjYYkWY6+2NM6Mko8ntHITk5kt0jLBO4bA/Fyn/V/ ZlRPD9nDDi1fO9Gv45Aid6OxBqwyYalvPDSVl5PuyS2Ofy3OasEhyEFUXg2gBJgRzSo4 +usw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=XLJT5eSV97fI2ryXuSJzCS33QN/pPjAfrUZc4fdWNwA=; b=M/WC52tOQnmtXGIRIICPY5mmmmwFnmf8lNDj34ZiyExf8Nydu0X6FUPdAuDleCO8Cz Jxly1oZDiyT+RhkjPynnZO47DWPZ2SrM8wkcPbbZ8BbKncAazdnBk3yrZeV03iLO0Vt5 mLxhz2X6CvGMs6mGjFWA5IqV569Mb4KztjZO1I4Aj3g8MfFoUkwAhHK1o794K6uWQpnW atiOwcIjTwzfRSQwzWYXNxUeIEUeV1uxuEZEBQ+/Aj4cwX1oYjZldgwVZEvUsD+Cn5us rBlD8vnUMdAJIMNq7L8iIPBXugM0Mbkqantbpx1NcxceYM/2ZLAnNbRjSrl4rUjre83C +fYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=eF0HOJPo; 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=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a63d509000000b005031231026fsi5271386pgg.543.2023.04.01.13.30.34; Sat, 01 Apr 2023 13:30:46 -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=@oracle.com header.s=corp-2022-7-12 header.b=eF0HOJPo; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbjDAUW1 (ORCPT + 99 others); Sat, 1 Apr 2023 16:22:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjDAUW1 (ORCPT ); Sat, 1 Apr 2023 16:22:27 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46A53B46F for ; Sat, 1 Apr 2023 13:22:26 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3313IwS7027015 for ; Sat, 1 Apr 2023 20:22:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2022-7-12; bh=XLJT5eSV97fI2ryXuSJzCS33QN/pPjAfrUZc4fdWNwA=; b=eF0HOJPox2bTdEoK8yZGut6ZDZmNuUnEwtOZVTDXRlrmlnt7Cx7vY/WzR6vEeS6rUmJt Az03RSgMe6dxMXQiJTdD0cxcH64hUOZFy9w/Xm946noMx3LVIXMgNimLeOdrY3pY9oRE 4g9AG005pj1itDbq5Pifu59RZx1IALRPGAuIQNLlSCYWnaTMpt2Vq0ldsxMGoqAzT+1j Ho6lMFPV4LPLlFp88Im3ZXuxT0Wvu/M6F6FSrtjqVjAdxhqpfkI5+UoZ3kwyi9Hv5SIk g20nsCQt7+UnRrIJQ2+XfAW49z4xcrxIb4Vnrc/DVXtyo6Q9Hk0cdvJhyyrqgrNN+GJu AQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ppbhbruwh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 01 Apr 2023 20:22:25 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 331JK6W1017930 for ; Sat, 1 Apr 2023 20:22:24 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3pptp39anh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 01 Apr 2023 20:22:24 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 331KMNSv023448 for ; Sat, 1 Apr 2023 20:22:23 GMT Received: from ca-common-hq.us.oracle.com (ca-common-hq.us.oracle.com [10.211.9.209]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3pptp39am7-1; Sat, 01 Apr 2023 20:22:23 +0000 From: Dai Ngo To: chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH] NFSD: callback request does not use correct credential for AUTH_SYS Date: Sat, 1 Apr 2023 13:22:08 -0700 Message-Id: <1680380528-22306-1-git-send-email-dai.ngo@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-31_07,2023-03-31_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304010186 X-Proofpoint-GUID: JYOhCNsatbQihUqMU_Lbyi9VofT3ter0 X-Proofpoint-ORIG-GUID: JYOhCNsatbQihUqMU_Lbyi9VofT3ter0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Currently callback request does not use the credential specified in CREATE_SESSION if the security flavor for the back channel is AUTH_SYS. Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error: DELEG5 st_delegation.testCBSecParms : FAILURE expected callback with uid, gid == 17, 19, got 0, 0 Signed-off-by: Dai Ngo --- fs/nfsd/nfs4callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; - kcred->uid = ses->se_cb_sec.uid; - kcred->gid = ses->se_cb_sec.gid; + kcred->fsuid = ses->se_cb_sec.uid; + kcred->fsgid = ses->se_cb_sec.gid; return kcred; } } -- 2.9.5