From owner-freebsd-fs@freebsd.org Sun Feb 10 18:57:20 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7639014D698B for ; Sun, 10 Feb 2019 18:57:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0C3758BBB9 for ; Sun, 10 Feb 2019 18:57:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C090F14D6989; Sun, 10 Feb 2019 18:57:19 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C94B14D6987 for ; Sun, 10 Feb 2019 18:57:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CB8B8BBB4 for ; Sun, 10 Feb 2019 18:57:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 35C1114D81 for ; Sun, 10 Feb 2019 18:57:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x1AIvIUQ026655 for ; Sun, 10 Feb 2019 18:57:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x1AIvIvs026654 for fs@FreeBSD.org; Sun, 10 Feb 2019 18:57:18 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: fs@FreeBSD.org Subject: [Bug 235582] rpc_svc_gss / nfsd kernel panic Date: Sun, 10 Feb 2019 18:57:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-RELEASE X-Bugzilla-Keywords: panic X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: peter.x.eriksson@liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2019 18:57:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235582 --- Comment #13 from Peter Eriksson --- I'm running a kernel with your patches now on our test server. With some ad= ded code to print the 'cname' to export_name converted as hexadecimal characters (for non-printable ones). It really looks like som 'struct' ending with the length of the principal as a 4-byte int and then the printable principal na= me. Not many NFS clients connecting to that server so a race condition causing = the "random" characters isn't really likely. Especially not when it's the first call to happening :-) (Machine authentication) rpcsec_gss: svc_rpc_gss_accept_sec_context: cl_cname =3D \x04\x01\x00\x0B\x06\x09*\xFFH\xFF\xFF\x12\x01\x02\x02\x00\x00\x00\x16FILIF= JONKAN$@AD.LIU.SE (41 bytes), cl_sname =3D nfs@filur00.it.liu.se rpcsec_gss: accepted context for (41 bytes) with (User authentication) rpcsec_gss: svc_rpc_gss_accept_sec_context: cl_cname =3D \x04\x01\x00\x0B\x06\x09*\xFFH\xFF\xFF\x12\x01\x02\x02\x00\x00\x00\x12tesje= 148@AD.LIU.SE (37 bytes), cl_sname =3D nfs@filur00.it.liu.se rpcsec_gss: accepted context for (37 bytes) with My quick hack to print the export_name: maj_stat =3D gss_export_name(&min_stat, cname, &export_name); if (maj_stat !=3D GSS_S_COMPLETE) { rpc_gss_log_status("gss_export_name", client->cl_mech, maj_stat, min_stat); return (FALSE); } if (1) /* Debug printout */ { gss_buffer_desc tmp; char *src, *dst; int i; OM_uint32 dummy; dst =3D tmp.value =3D mem_alloc(tmp.length =3D export_name.length*4+1); src =3D export_name.value; for (i =3D 0; i < export_name.length; i++) { if (*src < ' ' || *src > '~') { sprintf(dst, "\\x%02X", *src); dst +=3D 4; src++; } else *dst++ =3D *src++; } *dst =3D '\0'; rpc_gss_log_debug("svc_rpc_gss_accept_sec_context: cl_c= name =3D %s (%d bytes), cl_sname =3D %s", tmp.value, export_name.length, client->cl_sname && client->cl_sname->sn_principal ? client->cl_sname->sn_principal : ""); gss_release_buffer(&dummy, &tmp); } client->cl_rawcred.client_principal =3D mem_alloc(sizeof(*client->cl_rawcred.client_principal) + export_name.length); client->cl_rawcred.client_principal->len =3D export_name.length; memcpy(client->cl_rawcred.client_principal->name, export_name.value, export_name.length); gss_release_buffer(&min_stat, &export_name); --=20 You are receiving this mail because: You are the assignee for the bug.=