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 1A7612FE56F for ; Sun, 17 May 2026 07:05:33 +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=1779001535; cv=none; b=ixXf6QNDa3oQx9EH0T9oDIPII6odS+fIaS3WCeGhtNZIt5Rn26gvRDarb8HAmZzEHiguAlx/kGySKQK8eeb6HB+KeKxcq1xlXMPtaMl+3X7PjIOt7H8DteTd8e1ptuE8yELBOowCJ+mwHuS72jCpGYdiCfctaw3Ewt3d7fFCiVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779001535; c=relaxed/simple; bh=djOrPwVGKoh4zZfCftphrFlXtEBFmS6XYczt64tnpHo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FQyNuUJ0iDCPbHEH1C5ERbi2JTPxugacfsXrKbUwxA+lGCFrg3/YnlH+tGD6A/iFcpRDFnD/Z4nV1VlgptWulK96cfrsxEpJIyeWWQPe3NjgfAQaLceyXXXjMPwgqjV2kmp9VIh3Ii4qYlNvHu4f1a0ZKgMQSf8xy+k+hcW67Dg= 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=F8z3m62K; 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="F8z3m62K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779001533; 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=Ltctjc7r1394XUJm5pCSTCzl1LWQxcKmwThNMn0v7fg=; b=F8z3m62KnsqUIZ92ZmJOOGmLI1JR34d+voZQ50+WjznVZe60FzAC3UhCEPZUIlQ9/BrlGH glPoIWXbgl8xuiHsLY5evr4o9vRBgdAUFD6DiQEP9ctC2SbvfEGpLnjBlVf83Wz40bcMpu jRbI5GlDE7yc85rDSJckfbs4SEoQQVY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-18-PArAzHE2NUKdsnNN-yOTDQ-1; Sun, 17 May 2026 03:05:31 -0400 X-MC-Unique: PArAzHE2NUKdsnNN-yOTDQ-1 X-Mimecast-MFC-AGG-ID: PArAzHE2NUKdsnNN-yOTDQ_1779001530 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ACA8519560AA; Sun, 17 May 2026 07:05:29 +0000 (UTC) Received: from fedora (unknown [10.44.48.45]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id B6AE81800762; Sun, 17 May 2026 07:05:27 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 17 May 2026 09:05:29 +0200 (CEST) Date: Sun, 17 May 2026 09:05:26 +0200 From: Oleg Nesterov To: Tetsuo Handa , Andrew Morton Cc: Deepanshu Kartikey , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH -mm v2] do_notify_parent: sanitize the valid_signal() checks Message-ID: References: <20260316151956.563558-1-kartikey406@gmail.com> <20260317113452.cede9a514dfed36a1cb0e5a9@linux-foundation.org> <5acfea15-f2f7-4498-86e1-a383e17adad0@I-love.SAKURA.ne.jp> 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: <5acfea15-f2f7-4498-86e1-a383e17adad0@I-love.SAKURA.ne.jp> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 05/17, Tetsuo Handa wrote: > > On 2026/03/18 4:08, Oleg Nesterov wrote: > > On 03/17, Andrew Morton wrote: > >> > >> On Tue, 17 Mar 2026 14:58:18 +0100 Oleg Nesterov wrote: > >> > >>> Now that kernel_clone() checks valid_signal(args->exit_signal), the "sig" > >>> argument of do_notify_parent() must always be valid or we have a bug. > > No activity for two months. When is the fix expected to land to upstream? > This bug allows a local unprivileged user to crash panic_on_warn=1 systems > by running below program, and therefore should be fixed before Linux 7.1 is > released. This patch depends on [PATCH v3] kernel/fork: validate exit_signal in kernel_clone() https://lore.kernel.org/all/20260316151956.563558-1-kartikey406@gmail.com/ but it was merged without the patch above. Andrew, that patch is still in mm tree, kernel-fork-validate-exit_signal-in-kernel_clone.patch could you merge it as well? Oleg. > ---------- > #define _GNU_SOURCE > #include > > static int proc(void* arg) { return 0; } > > int main(void) { > static char stack[8192]; > return clone(proc, &stack[sizeof(stack) - 64], 127, 0) == -1; > } > ---------- >