From nobody Fri Jun 17 19:38:09 2022 X-Original-To: dev-commits-src-all@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 E3BA085B114; Fri, 17 Jun 2022 19:38:09 +0000 (UTC) (envelope-from git@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 4LPq8K3DWCz3Pyp; Fri, 17 Jun 2022 19:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494689; 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=pG9Z+no4YwMtHPIhJ3jhXcZM7p87uKFxjkUdFGxcFHk=; b=MtdBvqFS8pH4Phz0s0hDT0BfioxYFmIPk4cbSmTAUxjX3M9/w/0Y6r4xPSz/Zqba2atmyF acga0ixrgZj3JZx352haQZgUTrBxgGk5Zd4BN02hbdMcoNhknUG2/6vb9sQsiHv6woxA6b thO7e0xpXd0GRRYTG7towqpMxLjCPqxp0pMBXEYeU2gWE+xJhKtvd0cHfaaqik4R8id0cX hH4CSj2xTH468kSjd3KL4vdtN4YlEZi7/+FNCfOKDeU90oUwL8EFDdGzVuZwgecHR31v/j OH+BuoLN47enUrZ55fR1Elx1ilVoBWlwCwXEllBYGsb73qWxYoTMkuKtnBFNJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 20D3525AC4; Fri, 17 Jun 2022 19:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJc9CJ014298; Fri, 17 Jun 2022 19:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJc9UH014297; Fri, 17 Jun 2022 19:38:09 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:09 GMT Message-Id: <202206171938.25HJc9UH014297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 56d1afc72d6a - stable/13 - linux(4): Verify that higher 32bits of exit_signal in clone3 are unset. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56d1afc72d6a6464d450cb24190610f2ba55ac8e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494689; 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=pG9Z+no4YwMtHPIhJ3jhXcZM7p87uKFxjkUdFGxcFHk=; b=TQ60nGCGU/+EZBfSbl36atopqyIc2aROfWiScU221zS4mTsGt3LIwepIwtvwy5n08jV+DV xcel4BJkOeTZkXRdcxYLFxoSJ6dyNPnVhAjNt6Kq/BFTI+Mh4xzNegnMZc7aOx6uYhRAn/ Zwhls8vNzkc4xvupzL+5bgk0oGp5xgT/ReeX0M/MdkMXg5kQ3+2jhkMiko9Y+DHjdYzL69 MMmF/V2RmE5R4tXViXcb4DZxDsXmjNAPbdTgAm3lN5eGazma0S836Xo01JbtP8w/9+Z7wA EjqFnhk2/c8ynPQucYLNfroMw5+d0pD8rT4KbyesjnP8hpbM/gRmCh2tpTELyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494689; a=rsa-sha256; cv=none; b=qsoR+xdLADv1s2+BkbaLGQYS0Zoqk7C4AAttviwUXg0oO6QazfVIU5Xw1f1LUJUpRC/74+ rQOkCACVka4a3fGbNTvmK31Qi490pzKRPeOiPig3sBESDY4km9imxNbzXwTRF+aWDxSrwX 889YVErcHYHdpkQvZYUXLFfShX/Z3eHwwNgdTdAX1eEi6ibvxNulnmxf1yYtTelXE+JEqB sR3WHtf3rVkKMp7C36NwuHnd2clz4/v0Oqqm754DPjgi2c9IvyQ2yLyx1x0y/OCNxIVYss ILZvTeASh2NZHE+ugnDjalR4p/SkPIlrAYhoEzdL5W3bDaUnv6YGUQsXae1K1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=56d1afc72d6a6464d450cb24190610f2ba55ac8e commit 56d1afc72d6a6464d450cb24190610f2ba55ac8e Author: Dmitry Chagin AuthorDate: 2021-08-12 08:56:51 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:32 +0000 linux(4): Verify that higher 32bits of exit_signal in clone3 are unset. MFC after: 2 weeks (cherry picked from commit c2cc5345b88e98efb85ebc7318b8f92a8455345e) --- sys/compat/linux/linux_fork.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index ba169ff98923..72e753db60d4 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -412,6 +412,10 @@ linux_clone3_args_valid(struct l_user_clone_args *uca) if (uca->stack != 0 && uca->stack_size == 0) return (EINVAL); + /* Verify that higher 32bits of exit_signal are unset. */ + if ((uca->exit_signal & ~(uint64_t)LINUX_CSIGNAL) != 0) + return (EINVAL); + /* Verify that no unsupported flags are passed along. */ if ((uca->flags & LINUX_CLONE_NEWTIME) != 0) { LINUX_RATELIMIT_MSG("unsupported clone3 option CLONE_NEWTIME");