From nobody Sun Apr 02 01:18:15 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ppx3q6y6yz43ghS for ; Sun, 2 Apr 2023 01:18:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ppx3q5LLVz3Kg5 for ; Sun, 2 Apr 2023 01:18:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680398295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tbC7wCo4PVopOVrGykN/J3gs8ZG4hHZwg0H5HxR7Ewg=; b=tAE+FinoEv4GFCiZVWbHN8oFsVWwfj9vcJ8j03mwK0zNgosx27aqjHDXK6HcWtFRZgaEvr ScDomDV2H6+BsGY9nj63lTdHx38I3aM6IL5mc8fmh5SAaAHcSVDOM8VsCYR5VKj8lGjeGv 4ooXgMTVrPosyS5nzyhgFDve6fu9WiXfJg2EoLtFCNZDilvhlwu1vsmm2BTi3RZVRvTJjk JtX/dt+ig4phX2hSXR5V6Bp+OfrHeaqkNj/oy4tlZ7Rio1asYqX3HoIiGbcvUDBDFC/KnG skt7T/bih7w0UMRjOTC9ibbPuf+/YOzVyYKsdQYnla9N7+lod+PZ5Js8eNUmIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680398295; a=rsa-sha256; cv=none; b=PiGt/BuqeBDLtTGQPytyChHYBPv9qcGoWHy9f1EA8P722/zWYm/bbmj9u+nj3UooZErLUQ IMpLFBXTAg5HFOAHVzAtrdN2lDOQHW+5qURJIzzSLsj8OiZFx8lpNl/enoz2XVB5twLSYp WGGjAj0GDEwAKgah7jfMpvl0jBsJHYW01Obf6CE3pMKHEuUJP+HBS7am69XdlTZPxhBTRS hCzp4YkQwlD1YAx0zcCQ95V06GF6FjSB/hqleTajG+h5i92Ien/eR+xhYG57DozqY2aP4M hDbW7c246sS76XCVaDfbNy8k5bitcoYyDeWiaxRFMGzg56/lCxHgI4zVjYbAew== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ppx3q4J55zxQ2 for ; Sun, 2 Apr 2023 01:18:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3321IF6u043807 for ; Sun, 2 Apr 2023 01:18:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3321IFgN043805 for bugs@FreeBSD.org; Sun, 2 Apr 2023 01:18:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270592] nfsv4 /etc/exports with -sec=krb5p gives permission denied Date: Sun, 02 Apr 2023 01:18:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: me@svmhdvn.name X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270592 Bug ID: 270592 Summary: nfsv4 /etc/exports with -sec=3Dkrb5p gives permission denied Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: me@svmhdvn.name Testing environment: * server: FreeBSD 13.1-RELEASE running KDC inside jail (MIT kerberos security/krb5 from ports) and base NFSv4 server in the jailhost (nfs.my.dom= ain) * client: Alpine Linux edge with MIT kerberos (client.local) I have setup Kerberos host principals correctly in each of the server and client keytabs, and acquired a user principal ticket that corresponds to the same user on both the client and server. TESTS: **Test #1**: /etc/exports in the server: V4: /nfshome -sec=3Dkrb5p /nfshome -sec=3Dkrb5p When mounting in the client: # mount nfs.my.domain:/ /mnt mount.nfs: access denied by server while mounting nfs.my.domain:/ mount: mounting nfs.my.domain:/ on /mnt failed: Permission denied I can see in this test that on the server, gssd logs the correct principal-= >uid mapping and the request is clearly coming through. **Test #2** /etc/exports in the server: V4: /nfshome -sec=3Dkrb5p:krb5i /nfshome -sec=3Dkrb5p:krb5i When mounting in the client: # mount nfs.my.domain:/ /mnt # The mount completes successfully and I am able to read/write files to the N= FS share. When I look at the mount information: $ mount [...] nfs.my.domain:/ on /mnt type nfs4 (rw,nosuid,nodev,noexec,relatime,vers=3D4.2,rsize=3D131072,wsize=3D131072,n= amlen=3D255,hard,proto=3Dtcp,timeo=3D600,retrans=3D2,sec=3Dkrb5p,clientaddr= =3D192.168.0.11,local_lock=3Dnone,addr=3D192.168.0.201) It indicates a successful mount of -sec=3Dkrb5p **Test #3** /etc/exports in the server: V4: /nfshome -sec=3Dkrb5i /nfshome -sec=3Dkrb5i When mounting in the client: # mount nfs.my.domain:/ /mnt # The mount completes successfully and I am able to read/write files to the N= FS share. When I look at the mount information: $ mount [...] nfs.my.domain:/ on /mnt type nfs4 (rw,nosuid,nodev,noexec,relatime,vers=3D4.2,rsize=3D131072,wsize=3D131072,n= amlen=3D255,hard,proto=3Dtcp,timeo=3D600,retrans=3D2,sec=3Dkrb5i,clientaddr= =3D192.168.0.11,local_lock=3Dnone,addr=3D192.168.0.201) It indicates a successful mount of -sec=3Dkrb5i CONCLUSION: I expect that when the server exports are listed as in Test #1, I should successfully be able to mount as -sec=3Dkrb5p. Why am I getting "permission denied" in this case, but not in Test #2? --=20 You are receiving this mail because: You are the assignee for the bug.=