Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp635873lqp; Fri, 5 Apr 2024 04:43:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9l/3ZdODPNYhPQ7tyrw7aMUC0g1bSITUBLDGWg0SBBXd2XRoPxLo3KIdIRpWInS12u20MJtvEPAHPmexR8BOo2v2Ny1DVaYWKN3S4Cw== X-Google-Smtp-Source: AGHT+IFVWaMbTB29t6NypI4F0a6dE89Vl4Osu/OkJDN/NEf7ZJdTpCwXZ0l5e+7sPyAMHu6ZL3ce X-Received: by 2002:a05:6a20:2585:b0:1a3:6a71:8282 with SMTP id k5-20020a056a20258500b001a36a718282mr1512471pzd.0.1712317404436; Fri, 05 Apr 2024 04:43:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712317404; cv=pass; d=google.com; s=arc-20160816; b=T7NUlSeBJOUEiroPW+7+eRj7Ddm1DwQyhLZ3brxJiIh+aR/n2lKOE/Ip9qxivmpAei krpD2p95mGorQmSPGfYQSxcAPN8I4DIeHqBVqAo/o48pNgoGQ7BMimJWffic/+qJc6UE JlHl6JBKDzaA4kteJU65WoGboR2tg13HxWWs3awVM90N8KkQArXJX7gcEXYgWevKPUVJ hx8LMm7cVzBbjdJc14p/Qm/1IOayD1h/hXV2P8GQKgKaa+B4EzWx7/3s6ufm1Cr6Im9S bY2SZWM6Ni6FfXPoF5QjgnhAovabi9rBur6w3OmpuPoB7XfL7kUuPd3gOe6iJOuFRtmk VyVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=yffYJ0OQb5kECdBs8DDmXjZlEz5NyiP498+7Qdodzxo=; fh=UTnxRGbQDzn75garEhJZrDDtTazDNWmnXkv1Ofy1uH4=; b=UfUrFnmgOrxs6joYZ9jHfbohNOfpXZtf95+iyAx6w5ZvUv/CIZ9VnKGjSpJhCxM8Rq xzSyDlLZLg/XtkmfAxV7dXPzNe96D1awfdZlOHKdfbtlVutqUnLo1cEKnxzta5Cn3hB5 4aFB0ilYNWeMBsUJbN5kQSPBWll/9cBlB/kGadWuUX6AoHqNCyDIBC41OguLDNuHHuFh 28vFDytm6NkS1zw7abXqdruhgpENduPr6U9LxBizCqzRyyne6JXT+DO9GoavLKYBws7c feXZXy1sA5aKzpQZrC/MS6PoHTpzPZpyCAwNzwZtrxNJlz7vMLvNQBFi8bv8PS4Q6D4F bZww==; 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-132918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132918-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m32-20020a635820000000b005d8ad5aa264si1239709pgb.798.2024.04.05.04.43.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 04:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-132918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132918-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 574D8B21A2B for ; Fri, 5 Apr 2024 11:43:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E787516C69C; Fri, 5 Apr 2024 11:43:14 +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 7CDB216C44C for ; Fri, 5 Apr 2024 11:43:11 +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=1712317394; cv=none; b=PNudVDL0Jj+m5/CPhxD7LDFSZfGAAGjpMyy9rUmzJeQklGg/OoWlSCLejrLtJFiB471OXyqnWbEFpTnCW3XTFXjgwSC3nnd1kprGFhObGuKKPEl4cQPtdbSMvBQVNDeUjyURL1VnfQ4deG+hintRJkzV33Eaky4mpsHNeVLoZqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712317394; c=relaxed/simple; bh=OYC/BHBrryNr61zuhgQB7gUOSHiQe+sjz+Ihr/W+x4Y=; h=Message-ID:Date:MIME-Version:Subject:From:To:References: In-Reply-To:Content-Type; b=IFVwqfzt+AGv2DAhjS6HxENASRA2Sbffle25Gnwi4y4cRBePED1AXsXcG4fWO2Bj2Cc6GuRVBuZLJ6wJ2S+RBulk9bLse2y6eU2SZIWaYzeJXQrUiw8G3KtFyfiGYU/2YM5VFzQtZFHpCXoqlu7C2KM9F5OvO/8j/V8Hx1gi7Kc= 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 fsav412.sakura.ne.jp (fsav412.sakura.ne.jp [133.242.250.111]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 435Bgu6F078881; Fri, 5 Apr 2024 20:42:56 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav412.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav412.sakura.ne.jp); Fri, 05 Apr 2024 20:42:56 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav412.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 435BguG5078876 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Apr 2024 20:42:56 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: Date: Fri, 5 Apr 2024 20:42:55 +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 From: Tetsuo Handa To: syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Kees Cook References: <0000000000004cf5c205faf1c7f3@google.com> <1fec6a8b-7083-4b08-858a-0793f996ed52@I-love.SAKURA.ne.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 326864f79d18..0f70a68d730a 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h @@ -37,14 +37,11 @@ struct thread_struct { struct debug_info debug; }; -/* - * Everything usercopied to/from thread_struct is statically-sized, so - * no hardened usercopy whitelist is needed. - */ static inline void arch_thread_struct_whitelist(unsigned long *offset, unsigned long *size) { - *offset = *size = 0; + *offset = offsetof(struct task_struct, thread_info); + *size = sizeof(struct thread_info); } #define INIT_THREAD { }