Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5618959ybe; Tue, 10 Sep 2019 06:32:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqziKfrL+vhMJKfv/CZeuCsE7rQKJHs4L4jW8q/+JjA4VMFHN93Cet8WcRl8/GoSI317C1/n X-Received: by 2002:a17:906:6448:: with SMTP id l8mr24978702ejn.233.1568122330551; Tue, 10 Sep 2019 06:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568122330; cv=none; d=google.com; s=arc-20160816; b=MVruJv5GLjyHKkDzPaaQyY2pi2NYCAWdDc4mM6L+ifCjmTF5XYFXegGGXZiQPclO14 7ODolZQ93Zd/R+xahEFB/vnU0rrPksDcmyQCPlHi0yKMZ5B4ybNb0ivDTVICrOYmusbp FcdQEtS92Yz1HxHPa0bw1EjRUvqGZADiVZv4wOUoWhCXTh6cAf5kh7+xc9uPT9WvhtBo 0uAU+FzeXZTdMDeg8BVU0NKpGiM2vkSAUweeoU2YjbePrl0jtO91S4IPrRJkg/8y6InM +CGBV88RVhOethI/ZmVxVSuFdaKgZ6RS0MU262718OXJ/V60Mq5c0RpTOv/ew95lcxLu C0jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=0/+q7gxaSpjLn6KqmF9PnrNyurM9Jk529GCX7BKk+nU=; b=jmWz+Z4MNbNuqASnxSavs/TLPynKRFxuGcufXnUFLqjSi8mJdt3RwHwe4sxE0WqeRa G4ka5pXcq2vfr4kUHREqTZiKoqaDxDd/Z0VMEPOk1/cO5/TjHoEFwtT1b8LnVPub3ItF KVo8qd9otnqiqfWuJroxDw+LlJq5BvSTigG0eOWA6g1EKV6BgJElQHig4awU7zYqrZBV sDN9xRRnttilvgK8c9cqE8LIi2jAUaLrjEA0R1V/Y+JTkF1F8Gsj5rFuKE9kRxgRyDs6 w+IVSdqg86Hbl0pxcHUThyfCtB4KY+8ghl6un36us/oJDcoZK3b6hFrmZLfDAxjXz+xn gGyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si1196675edr.377.2019.09.10.06.31.47; Tue, 10 Sep 2019 06:32:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388808AbfIJMUf (ORCPT + 99 others); Tue, 10 Sep 2019 08:20:35 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:46586 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388476AbfIJMUe (ORCPT ); Tue, 10 Sep 2019 08:20:34 -0400 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 4363B72CC6C; Tue, 10 Sep 2019 15:20:32 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id BD4867CCB47; Tue, 10 Sep 2019 15:20:31 +0300 (MSK) Date: Tue, 10 Sep 2019 15:20:31 +0300 From: "Dmitry V. Levin" To: Eugene Syromiatnikov , Christian Brauner Cc: linux-kernel@vger.kernel.org, Andrew Morton , "Peter Zijlstra (Intel)" , Ingo Molnar , Eric Biederman , Oleg Nesterov Subject: Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal Message-ID: <20190910122031.GA5311@altlinux.org> References: <20190910115711.GA3755@asgard.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190910115711.GA3755@asgard.redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 10, 2019 at 12:57:11PM +0100, Eugene Syromiatnikov wrote: > Previously, higher 32 bits of exit_signal fields were lost when > copied to the kernel args structure (that uses int as a type for the > respective field). Fail with EINVAL if these are set as it looks like > there's no sane reason to accept them. > > * kernel/fork.c (copy_clone_args_from_user): Fail with -EINVAL if > args.exit_signal converted to unsigned int is not equal to the original > value. > > Signed-off-by: Eugene Syromiatnikov Reviewed-by: Dmitry V. Levin -- ldv