From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7263033556B for ; Tue, 17 Mar 2026 14:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773756616; cv=none; b=BdCKjF/bq81/0wYo7aPLVPHHZ8OpOkCZqvC/v3BU0gnVpovdHiewEHGTN99R1t4dAR68rKk7n6HJrZTzjb4+SsgTmA9/kqhGT3A/hOqOdhyadRJb1r1NBLaQeFFuv9STTz+zF2qvJt+4eUkBh8VNKgSjalDZduMnzz0UH6MFYt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773756616; c=relaxed/simple; bh=zTEjYMxz8nxI7sSA0AfMiRIrBlGTsxynyK1A2baWMLQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RHoz7l0pSoyUGsKqS/7p0ObzNRrjoNRez11Y3/Bw1cQ3Y/1Y8WHlsQAqzdSArJQkShhT54xX7qO+jx29A1OjMgMhCY8sOsTlvfbXn4hMsvVLH+D4631s1Q3PdkWTfDXibKl/i3Tnxk/89LCKVSPhitbxHZmKZ2BMa9FBkhxpWZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RZhiLGEz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RZhiLGEz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B07FFC4CEF7; Tue, 17 Mar 2026 14:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773756616; bh=zTEjYMxz8nxI7sSA0AfMiRIrBlGTsxynyK1A2baWMLQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RZhiLGEzLelyP2kYF5XxBKfSjB39PAV3Nbe7BvzhKzBGX6Nc+nunMon74QdTj/MXb bSXbnk/sfFBG/ZFWY53aTscpsXIuW+hdZ3L65xaogl+Wuyqncjfjvs3NfS6tU+hJx+ ytEfewD4Zw7oYf61jAzAgUQXnKoKPEcfdm6YgTi6WlG29nvWoig32zuHnYPFvMwYHb 1wSC4x0Niw6HWwM6J4KDzMJujB/mflaloD70dhr9QNTCwoSNO+/PSDpSKR3t0YO6LC UHqv5mR45/blvKCDW7RAz46pZHqB6T508paAEFvr33bMX3mp7cTr2TVf5wbSh0j8fI B41QWobEubxDw== Date: Tue, 17 Mar 2026 15:10:08 +0100 From: Christian Brauner To: Oleg Nesterov Cc: Deepanshu Kartikey , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kees@kernel.org, akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org, Liam.Howlett@oracle.com, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com Subject: Re: [PATCH v3] kernel/fork: validate exit_signal in kernel_clone() Message-ID: <20260317-federn-umsiedeln-3afae949282a@brauner> References: <20260316151956.563558-1-kartikey406@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Mar 17, 2026 at 01:48:42PM +0100, Oleg Nesterov wrote: > On 03/16, Deepanshu Kartikey wrote: > > > > Note that this is a user-visible change: previously, passing an invalid > > exit_signal to clone() was silently accepted. The man page for clone() > > does not document any defined behavior for invalid exit_signal values, > > so rejecting them with -EINVAL is the correct behavior. It is unlikely > > that any sane application relies on passing an invalid exit_signal. > > Agreed... > > > - if (unlikely((args.exit_signal & ~((u64)CSIGNAL)) || > > - !valid_signal(args.exit_signal))) > > + if (unlikely(args.exit_signal & ~((u64)CSIGNAL))) > > return -EINVAL; > > I guess this can die too, but OK, this needs another patch/changelog. > > Acked-by: Oleg Nesterov > > > Andrew, I will slightly update the changelog and resend > do_notify_parent-sanitize-the-valid_signal-checks.patch > in reply to this patch from Deepanshu. I'll take this via the pidfs/kernel tree. I also have a bunch of work touching this stuff queued there.