From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2CFAC77B60 for ; Wed, 26 Apr 2023 21:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbjDZVsp (ORCPT ); Wed, 26 Apr 2023 17:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238389AbjDZVsn (ORCPT ); Wed, 26 Apr 2023 17:48:43 -0400 Received: from cynthia.allandria.com (cynthia.allandria.com [50.242.82.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED9F01FF9 for ; Wed, 26 Apr 2023 14:48:41 -0700 (PDT) Received: from flar by cynthia.allandria.com with local (Exim 4.84_2) (envelope-from ) id 1prn08-000166-1P; Wed, 26 Apr 2023 14:48:36 -0700 Date: Wed, 26 Apr 2023 14:48:35 -0700 From: Brad Boyer To: Michael Schmitz Cc: Finn Thain , Andreas Schwab , debian-68k@lists.debian.org, linux-m68k@lists.linux-m68k.org Subject: Re: signal delivery, was Re: reliable reproducer Message-ID: <20230426214835.GA3547@allandria.com> References: <1fcaa695-5c2d-0c76-444d-6d6be0105f6e@linux-m68k.org> <87y1mgryp1.fsf@igel.home> <63d4ef2b-ffdc-0294-30c8-aac50ee7b946@gmail.com> <51b8464a-bb05-144b-949f-b92720b1227c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51b8464a-bb05-144b-949f-b92720b1227c@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org On Wed, Apr 26, 2023 at 09:10:50PM +1200, Michael Schmitz wrote: > Am 26.04.2023 um 16:42 schrieb Finn Thain: > >If the long format frame was corrupted while on the user stack, the > >partially completed MOVEM won't be resumed correctly. That's why I was > >concerned about a bug in sys_sigreturn. > > Yes, it turns out I hadn't read mangle_kernel_stack() carefully enough. I > thought the exception frame had remained on the kernel stack to be restored, > but I'd missed that it is actually being restored from the user stack copy > to the kernel stack. Isn't that a security hole? If we restore the exception frame from user memory, doesn't that allow a malicious program to affect the internal state of the CPU just by handling a signal? Brad Boyer flar@allandria.com