Received: by 2002:ab2:604e:0:b0:1f4:60f3:cb4a with SMTP id a14csp12612lqm; Fri, 5 Apr 2024 07:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWG2dS/c2Rx5u4+PelEaksb7ITTzBZMyajjfuwya79XoBXaYangJLlL5Chi2Kymk1L9nFNDsqBsH8hhPfbh1NbOZn9Z9DZhWs8BZdkTw== X-Google-Smtp-Source: AGHT+IF4M4Qt0O+wmHmihEvOcm0/xn8fCpSFnJ+AHRUa0DVckY+hhkdDNBIDj5GKAtFwu084u4oc X-Received: by 2002:a05:6a21:19f:b0:1a3:4591:1e9a with SMTP id le31-20020a056a21019f00b001a345911e9amr2168907pzb.61.1712327355369; Fri, 05 Apr 2024 07:29:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712327355; cv=pass; d=google.com; s=arc-20160816; b=oDlYbLvfPhj8fvJ3IQj+jqq4FWJnfvcIWmQAm0T3wm1stlhYBcZE/T13uWWytsLlqt NCZe8rI1wjANWcEUQLLoxK45pE3fAJs2S79DtCwMO5LRswp50A2JsD9+dLFpEv9er3rO D7sFmqZ0bRstPDzFMwI2z4Du2XdDHwlRDMzWmNZOF6LJtUFx/ZaX4uKehm84txhH8INa spXEucmKSJ9rz9tPh8SCu6WwnUYJc+1k4wAUiDsJHKZOStBUOpocjrpwYMSeHRNQg/h7 /w8TqhfEBhcUNwvEn36sKWAXfhAqcpXCi1F7mA7nDTkraGJpW8rp5OUyAIsqYtuLhDyn ognQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=bp41FX7/elbMBm8GQ9ls8mMkRN9V8LIrtqpr3wLn6mY=; fh=hDgcd/0TKtjWk2ngeYNDcFTwGsLicC1NDSl1zUwX4wM=; b=u7A3chYWbyHk6PNKdV938Tl+y3IQGE5Nx9om+NNUbTv4+4L9kTKEov+L4fv3oyo2XA ZJmYH4SwSrdh4AkrR4CXoOIphczLG1xamr/PJyxWcWI15cskW63dShl0wBfyphe6Y00W OqSIEJ6fKR9p+I+sMI5CD6n55tW2BwDN8LU2W6l2NmgI11Tm52tc8jLS8RkZ79O0+ARz GKQSaJqFZuZYDXCJU4lJWSC/JbJE3zWqpZuytqqkqMS10xfrpwAeI0HnVZRpFalPK6sZ TLbuBCqqH0carcOnr0rPVG67lv3LZ+pralAxYaI3GYi2SU0LaCnad/4WWTD2Co6cL5Ir qFbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-133153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133153-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v19-20020a170902d09300b001e29dd4a856si1383785plv.521.2024.04.05.07.29.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-133153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133153-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 42137283199 for ; Fri, 5 Apr 2024 14:29:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04F7B16EC05; Fri, 5 Apr 2024 14:28:57 +0000 (UTC) Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (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 3DA6716EC02 for ; Fri, 5 Apr 2024 14:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327336; cv=none; b=CMkJepTU64kUi5MI5fp+WgMCucEuSOhwoclqEqbfPd9miRHPSIduFYpWqeGSoSH7ugwJ3SpDsWrvCx4VRnLAYCHltpvyMgmTCkSsjVSxLeLi+9cvvCR64hvpz3WKFbqzmiMXVFLsQqhyWKAApn09vVj/8TKNJ/ow6AOnEODKvfk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712327336; c=relaxed/simple; bh=ZKPxNyJ/POC7lEeU2rV6nn5Qm8glSbPgLQjlLHnJ+L8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AqhZhKf3QJu4MJ4EYZCMJVtp0iKtpiZ6ceUonvR+t3HZieMWFLBisH16WNMoqVWet9JUoiu4h7rhxTx8rWUh02eSRF33771anhwqsQcJyDYoxtJbxqtYFbdboj6/RPwjuVXwyRHJQgaoXNI3OSoIi8i4Vj+mXUn323QQvRrIng4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from fsav411.sakura.ne.jp (fsav411.sakura.ne.jp [133.242.250.110]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 435ESKvB018214; Fri, 5 Apr 2024 23:28:21 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav411.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav411.sakura.ne.jp); Fri, 05 Apr 2024 23:28:20 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav411.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 435ESKSm018210 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Apr 2024 23:28:20 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <0b49d91b-511f-449e-b7c3-93b2ccce6c49@I-love.SAKURA.ne.jp> Date: Fri, 5 Apr 2024 23:28:20 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [hardening?] [mm?] BUG: bad usercopy in fpa_set Content-Language: en-US To: "Russell King (Oracle)" , Kees Cook Cc: Linux ARM , syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <0000000000004cf5c205faf1c7f3@google.com> From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024/04/04 1:12, Russell King (Oracle) wrote: > Therefore, there is _no way_ for fpa_set() to overwrite anything > outside of thread_info->fpstate, because sizeof(struct user_fp) > is smaller than sizeof(thread->fpstate). > > Syzbot appears to be wrong in this instance. > Thanks for clarification. I came to suspect that commit 08626a6056aa ("arm: Implement thread_struct whitelist for hardened usercopy") missed that ptrace(PTRACE_SETFPREGS) needs to declare a usercopy whitelist. It seems to me that https://syzkaller.appspot.com/text?tag=Patch&x=14c42099180000 can fix this problem, but I'm not sure whether this is safe/correct. Can you check?