From nobody Wed Dec 01 00:47:04 2021 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 09FC518C5B5F for ; Wed, 1 Dec 2021 00:47:05 +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 4J3gQc6CR2z3nht for ; Wed, 1 Dec 2021 00:47:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B53B52040E for ; Wed, 1 Dec 2021 00:47:04 +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 1B10l4Pc087153 for ; Wed, 1 Dec 2021 00:47:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1B10l4hV087152 for bugs@FreeBSD.org; Wed, 1 Dec 2021 00:47:04 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 260111] NFS v4 server crash due to ACL handling Date: Wed, 01 Dec 2021 00:47:04 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: rmacklem@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to attachments.created 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 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638319624; 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: in-reply-to:in-reply-to:references:references; bh=Uthc0Llk3pZVbpWVfYgks4V+Qq8gL6X1FZQ0ciWes/0=; b=srjoqdkd3uwvCyDD2Fe8kwDPppenPpXM1i8DYCu4u3p+240e6bvTTy3uwKk/JlS9gf7NZ4 F6aJ57t6dlZoKHSDJ0w1smvFsI5QpT14qkEd+p3Q9KQ6GICzys7JVk/8SuzNeKS23mnQXj WdfjooHQM6CEsxh0uapoHtYV9BpKM3FeLFSp6QbMg6N64nEc17wKe+MVowg9LXCRkhX+PJ QOgMyUJFReRoGgZhOS3kBcjHX2JKBfSjhbsYPdGHw9Wj25HZHz1P5u9lX0h0y7i1Y4+c+r rAa8uzW9myzVS5IVk2HsfMxOFUNl5nIx9R0P4KoUlyoo2+/6wfREZSek7M+U3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638319624; a=rsa-sha256; cv=none; b=RVWYgzCrJ7Yx6/dKePcI00uDcdA9isDHNI9YeXiX3glgHv1aMBVpwRDGFc/j/Eki+0oQZR MvQU1mKI/pmUei174V6+ONdeU1qjP1oLefM6kIHDbEXWX3SnZxCG5/Osm02yuNJZx42ce3 6bVeMlSdugwvD7xtVuOuu/RiMA7usZm73JspYROszx2iVE0u8twIXvT50eQo2IsT65bKBc Ze5sCdZMdI9ENITdAqCsgWoHKhDjYVv3iFFVLmiFBh/sLSKwi74BP2GCwoXTW9Pxi5BvVu 1QVdyxHAh2PnICM+7e9znTykFuDQRkKTD5/TYRHWj3VsTQlBC7/xyPLteuMkIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260111 Rick Macklem changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Assignee|bugs@FreeBSD.org |rmacklem@FreeBSD.org --- Comment #1 from Rick Macklem --- Created attachment 229822 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D229822&action= =3Dedit Sanity check the acecnt and who size, plus fix a nfsv4_dissectacl() error c= ase This patch should fix the crash, plus a couple of other things. It... - Adds an if (error) check for the nfsrv_dissectacl() call that didn't have it to avoid the nfsm_advance() call at the end of nfsv4_loadattr(), as noted by Robert. - Adds a sanity check for the acecnt. (Checking for negative was the minimal check needed, but I also included an upper bound.) (As an aside, I should probably have made most of these count variables uint32_t instead of int, but that was 20years ago.) - Add a sanity check on the size of the "who" string, since a data buffer for it is malloc()d. Maybe Robert can check to see this patch fixes the crash for him? --=20 You are receiving this mail because: You are the assignee for the bug.=