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.129.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 411AB3D4123 for ; Wed, 29 Apr 2026 10:27:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777458458; cv=none; b=NybW+prFONdBaZ3/fwDJLCGwYuZpGz+zU+AtmMt0XwZniGMqFl25v2191OMXayaAfKsYpIkIkoYlDU69Qbtmdck2wXZRVJZOJbDfAQik3A/LPTyLWGdAg45MYIRdwq70vggIaEVtNJi57jqgPZwC2ae6/Y6uQk3D0BkC4YtrEdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777458458; c=relaxed/simple; bh=v+ZU9u+VxAYucbo03hr1tOROUsWzOMX19uLyS6tI0Rw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rsfUmCESMP8g9wVPQDcoI73eJ3go92CEWhVblFpMc5cXEV14SsMj88ClnreBCQf6cTyN8Ib/iojoSKrvPVIGTJC+ArXIYy5LqN0trN0BfuotNkfHk/wNidcaiAykCn2bZ6zOUmfWvggXIRrPdvA2JqnZfy3LOpHNpS16SM2L/Vs= 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=YyyMmqdr; arc=none smtp.client-ip=170.10.129.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="YyyMmqdr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777458456; 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=giivjRXdgRNqOW9kE8fH9q0572sS4w5jHj2dQurXLC0=; b=YyyMmqdrOtjTkznWIwolMg6/UStGNpBwLRWl6mZ+HJ6bIJxQ9S/dSRm05L9rX87RZw32Ut HzwzRelQ8RS0AqPtrwVyPrO+hlXFV/Jog/mqEtag665eitNKQJ9JDzQpv2M4VkYrvsx/u2 19t4dwVSk0cj8E8SsetQevVx8fkOfCc= 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-235-zTKq0xwTOoSuh8xyJDWr_w-1; Wed, 29 Apr 2026 06:27:30 -0400 X-MC-Unique: zTKq0xwTOoSuh8xyJDWr_w-1 X-Mimecast-MFC-AGG-ID: zTKq0xwTOoSuh8xyJDWr_w_1777458449 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 978911800265; Wed, 29 Apr 2026 10:27:28 +0000 (UTC) Received: from fedora (unknown [10.44.48.22]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 8A7DC300019F; Wed, 29 Apr 2026 10:27:25 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 29 Apr 2026 12:27:28 +0200 (CEST) Date: Wed, 29 Apr 2026 12:27:23 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org Subject: Re: [PATCH] signal: prevent evasion of SA_IMMUTABLE signals Message-ID: References: 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: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 On 04/29, Oleg Nesterov wrote: > > static int __send_signal_locked(int sig, struct kernel_siginfo *info, > struct task_struct *t, enum pid_type type, bool force) > { > + bool immutable = sa_immutable(t->sighand, sig); OK, sashiko.dev raised the valid concern, https://sashiko.dev/#/patchset/afHBYTUA5XexTj-Q%40redhat.com If a signal action is marked SA_IMMUTABLE (for example, by forcing a fatal SIGSEGV), and another thread repeatedly sends the same signal via kill(), the legacy_queue() check is bypassed. This check should be more strict. I'll send V2. Oleg.