From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 409163C5528 for ; Tue, 17 Mar 2026 12:49:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773751744; cv=none; b=fnx2zrPXVWuX3kdOVcqkdcfv6wV8PrGOvMx0Jnee64RsA9m/wky6pxfTyhd7R+SHvJOjdLGyYABV3nYKeEop2x4ie49jcXC98ZaS27X4oHrIqFzqVwbIyxre3G7M+KH8JKbgImEPlO4D6mNLNHFjeP9DbHYYN/9U5BbWCXntCmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773751744; c=relaxed/simple; bh=1yka8LrS9O5/qgtn0ZE649ju5IJb64GQI9w5PDcYjIs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jQqZJMMPqSIMfG+YnZl8XyCGXu3QRoJTkl71NFyoWWVkEkp1kYPCQVvLwYgHn5Q37KNeFVzHnR4a43dSrI81pg5YE5DJGN/liGtoUARZD+Lqw6VRwCfq5RKwWk4XvtRk56tjapEKfy2miArhNl71ZFsFn/vrol0m049/rR4PT6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MF1+fEKy; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MF1+fEKy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773751742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p8meEsPcYjYq3M656hxC1LNsg3q9rz4gRs0UsPS4fXw=; b=MF1+fEKySP3MfzBEN0jqCwfVqdiMnopZJvtfoa1plyEIgoYUIpfDD4IlTwSI4BWY6oQ4Yi VAu5ES3aBYQUnMfczUJAXR/s96Vti0epboYRRz1LYeaZCemZoIDDLf33gp5puAMdawWsiL yzWBl67CoilNteiYJNZXkt0WJgd/KuM= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-26-_pS-Wp-TNG2ZhKLZBOo5-A-1; Tue, 17 Mar 2026 08:48:56 -0400 X-MC-Unique: _pS-Wp-TNG2ZhKLZBOo5-A-1 X-Mimecast-MFC-AGG-ID: _pS-Wp-TNG2ZhKLZBOo5-A_1773751733 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B384518005B8; Tue, 17 Mar 2026 12:48:52 +0000 (UTC) Received: from fedora (unknown [10.45.225.204]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id F1E641955F19; Tue, 17 Mar 2026 12:48:43 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 17 Mar 2026 13:48:52 +0100 (CET) Date: Tue, 17 Mar 2026 13:48:42 +0100 From: Oleg Nesterov To: Deepanshu Kartikey Cc: 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, brauner@kernel.org, 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: 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=us-ascii Content-Disposition: inline In-Reply-To: <20260316151956.563558-1-kartikey406@gmail.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Oleg.