From nobody Wed Apr 13 00:57:38 2022 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 A70C411CCDD7 for ; Wed, 13 Apr 2022 00:57:39 +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 4KdPMR2S63z4XSm for ; Wed, 13 Apr 2022 00:57:39 +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 2318D21E58 for ; Wed, 13 Apr 2022 00:57:39 +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 23D0vdcC070817 for ; Wed, 13 Apr 2022 00:57:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23D0vd5p070816 for bugs@FreeBSD.org; Wed, 13 Apr 2022 00:57:39 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 260546] nfsv4_loadattr() can pass huge sizes to malloc() Date: Wed, 13 Apr 2022 00:57:38 +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: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: rmacklem@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=1649811459; 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=cT3yDrAmJK75mtBggjN8vN3tW0a3Jn82QzKxyW9Xsd4=; b=C+ICOiRciulbk2Uu1NrzyaMjcWZZe7CIHDTI6I1d4UXWEKoWhQdPAyk45Y+MVrdm53SAeO aVYjUGoVESd2ro2b5tj/YZRjsCzejP7POzUeG7SRZ3P/aqCrgqwvrEr31AxM0hJgN6pl0g FFHW0FDfUqqSKno5Xr2TV3SEOJxdVmlPKpcMINYTlR1oI6QGKD8j239o8/ZdXls7dv4PWz 7e+clQGEYy8ueVkYNfJ8f/13Z3tm4Y3YhyqemWXwvItidtt58E809LlBFzMUTbxyRmaAci LRiFGvDZU8CB8iOwnD76v0Q4uVbb1TgT1YniGks8pmKwWjeL6KTwZ+T7ZvPCdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649811459; a=rsa-sha256; cv=none; b=IUDOoRTxCouXKHNXIe4Pp1ws8oUPmMpVxMPCeeXdgt2Sr7R6grESoFdbrl9auqX1eGlusf WSKqQ/qT0XS0EfY3TKLeaLlK86i2qSr1W62+/2C7RIMJLxUfoROH8Q/RdV6GRft1UDggrP 8Q2cZpBFI4a6rZXyh8u4BifTv/3YtP4umSwrAZZkwbx/Edj0aLwQtG3/39Dr82kSbVlW4S ervFpVVqMEGNuwonhJTvMyFifbmDHVT3ATlpw74Z4gV4j9P5Qqn4HmT9ZZhTstooUCo3hL RvIosfOQPpikQBapJ0Y4RT8fnm8QwoQ+ujsK8FCBaogVlhhkN7+JNHOAHewlvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260546 Rick Macklem changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@FreeBSD.org |rmacklem@FreeBSD.org --- Comment #1 from Rick Macklem --- Created attachment 233181 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D233181&action= =3Dedit add a sanity check for a large owner/Owner_group string There is no upper limit for the length of an Owner/Owner_group string specified in the RFCs. As such, this patch uses a large (10K) sanity limit. I will post on a FreeBSD mailing list to try and get a better upper bound for a user/group name. However, any reasonable sanity limit should fix this problem. I did Owner as well as Owner_group, since they were both affected the same way. If the reporter has a way to test this, maybe they can report back if the patch fixes the problem for them? --=20 You are receiving this mail because: You are the assignee for the bug.=