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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 748BAC433F5 for ; Thu, 18 Nov 2021 17:22:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C0A560EC0 for ; Thu, 18 Nov 2021 17:22:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C0A560EC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jl1Np8xO3awYLOkS/PGW+UvSEJJuaj/aNpsn7CDhQIM=; b=pfUmuRWfIjKBjo 9ikSs8cN0XkIAOlZwO/iA3T35FKm9QoYr5rRFlr5ooQ0G/DoU/vh1Aclq4h7gofdRV/zLsimEVXuw FL5ZRGl/CfYPHmOt/LoRcuDbb9nhDnn+jDuNj3wdVGM4SGsrqy+OmoTQdrSbGzMUH4zXKXI2HQ0wZ 2XYZqVmP17rzxOVTI21NE9m0rVpn0laODQzlEPxGdLOOCnzSoSykk+C0veVxkRjgEEfW8a4mjIQo+ Pc21qe25zZFoWm2zJGvHRkoYSo1oJjRe9l6wEKsHzwUcxQQJGtZF5KWAQo5fDGySp7ICDPTEhunL7 NzspLSzAjxrn/et3NVLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnl5k-008S30-1I; Thu, 18 Nov 2021 17:20:56 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnl5f-008S2H-RQ for linux-arm-kernel@lists.infradead.org; Thu, 18 Nov 2021 17:20:53 +0000 Received: by mail-pj1-x102c.google.com with SMTP id iq11so5653292pjb.3 for ; Thu, 18 Nov 2021 09:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qF3dFEJZGRJtNF11kmh6blPwskIMMiy+AwHD5+7bKlY=; b=IR4MLGy8gee2IwKR9A+0TRlVg9coLKnoSk6e1ekxW6zPymF5ptj59pN8VA6WVL9Hrm MvM/zbqINU82Sp50PxHKbqqtS05ecyB2zxtl3+pve1CTO0Dii6m6gaX57SUWUh/OLkNf phzV4K8zB6BvhtvAMbPMeUgaM91y2s8d9v39o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qF3dFEJZGRJtNF11kmh6blPwskIMMiy+AwHD5+7bKlY=; b=z/IS4kf+OhRz/FSvDbxXPx6xehxcgvir2Tf0CSvG/dn3dkYDejoTKu5ZcJFsKOPtpq EmdeFxwTVK7iTWjZp9nQzFr19+niIHlOIxpSC9ysU/Puq2Y8v0XuZDF3Lmdk/Cfrr6SS 7tPaONMRAHgjBd7W3sa+PwVFAZdAG0VTQxnSP1CF2bu9KC4KKf85Xbu7wDtMSYhRkUH0 H23ffwvGNbzP3/0Ty55mIDiOQu+g8USuS1lk7wlw3VwT6UXZe7nvs5opFa7JwVjyjSGC 0DI34in/F3dxe4/RWmaa5QofY/aq4D+4jYsFoHvfkSnrCxkDQFVHJfXWGl1IbqgJ/yVA 4q1A== X-Gm-Message-State: AOAM531wNIRqucqTqA3kaZV3mcs+/XqBRkcITp/J8xSnUSXDI8SF5cfv m2I+YixmFYNnBZoPc1qcmgvw7w== X-Google-Smtp-Source: ABdhPJxivGHLlUtQYU5PudHC2KRPb2OIhZCQDTqM+bFLfuQ94CCe/xfqDrElVYfixd5QHCIasRDkhA== X-Received: by 2002:a17:902:860b:b0:143:87bf:648f with SMTP id f11-20020a170902860b00b0014387bf648fmr68876676plo.11.1637256050686; Thu, 18 Nov 2021 09:20:50 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o129sm218937pfg.44.2021.11.18.09.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 09:20:50 -0800 (PST) Date: Thu, 18 Nov 2021 09:20:49 -0800 From: Kees Cook To: Takashi Iwai Cc: Dinh Nguyen , "Ivan T . Ivanov" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE Message-ID: <202111180920.FA0FC5F9@keescook> References: <20211118142508.19200-1-tiwai@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211118142508.19200-1-tiwai@suse.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_092051_916444_2F202B78 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 18, 2021 at 03:25:08PM +0100, Takashi Iwai wrote: > When CONFIG_FORTIFY_SOURCE is set, memcpy() checks the potential > buffer overflow and panics. The code in sofcpga bootstrapping > contains the memcpy() calls are mistakenly translated as the shorter > size, hence it triggers a panic as if it were overflowing. > > This patch changes the secondary_trampoline and *_end definitions > to arrays for avoiding the false-positive crash above. > > Suggested-by: Kees Cook > Buglink: https://bugzilla.suse.com/show_bug.cgi?id=1192473 > Link: https://lore.kernel.org/r/20211117193244.31162-1-tiwai@suse.de > Signed-off-by: Takashi Iwai Reviewed-by: Kees Cook Thanks! -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel