Received: by 10.223.185.116 with SMTP id b49csp7970538wrg; Thu, 1 Mar 2018 14:34:06 -0800 (PST) X-Google-Smtp-Source: AG47ELs3KBzCmSNGBo4uDDa87DLXZ6d+xdVfMHf/BTYhyt6jvDZ/Qk6Ej9FjXpLxFbv0we+Sief3 X-Received: by 2002:a17:902:bc02:: with SMTP id n2-v6mr3327428pls.52.1519943646193; Thu, 01 Mar 2018 14:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519943646; cv=none; d=google.com; s=arc-20160816; b=V1UwouIn5REIYMhv71IZo8sqSLL7s5+CIBOPGWz9jopPu1n72Cqj7LgtazqGag+2NO RRQseg7lAbtVJMLm0J4kb7m3KW750EDNFsAxZMgu5JtMsYV2DKNz4e3XRR8pJLFtxmZ/ 2XNrdGmdmOtotcRy0jVIUL3UzmEUwAGeGm8WgPwV4mmuLbHj0bZhwtrkcQPZx8zOa6yY foeKT+En0xj+0vLBqeSW+j+AQY8f9Lfx2wkLbCfAbaBlW5Q7MT4G/9zdtFRx4ZrY1Vi9 9i0cOYaPyaDurOP1fQ/SQ0N9UGg2UgTB0b4/gUWCqx2WwbBaWpgg/CBKbXAdHYFyZa7n tEBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=GLhc/oZAnnCpqBALhtxstmDsurm+YJJ6jucyT0GWAD8=; b=0uCM95e7guOjIbERMatLPDPP8NQUAEDPGGzgEVN/yP+WaYi2yH2/8CD0utvhjd0A0Y WbsonOPEmTc8Xx+k59qptxN2LpTjo6JryAV+cRK9LN7W0cfgDfwKS/WHpS1cSbO8tTcu Uti3qxyVOPemR+hl/NZ1ifjTjgJoORPQfuWGKeFbP/OY8fzaoyrnyLZmQ9cj+tExcGjK LbOlARDIFiTaY9svnQ+gb3EkTqLiBKRnghJTrAspXHLwoopW181xQg8nRWh7cGJzNWHq kE0DyrEisLvdCFWx7Ghhaa1SsVCfqZjTxj9HCatgsxlmF2lag0rTA2QnCVMUFHGWkTCw p7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y/3/bE7G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si3728741pfg.265.2018.03.01.14.33.51; Thu, 01 Mar 2018 14:34:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y/3/bE7G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162651AbeCAWdI (ORCPT + 99 others); Thu, 1 Mar 2018 17:33:08 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:54375 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162638AbeCAWdD (ORCPT ); Thu, 1 Mar 2018 17:33:03 -0500 Received: by mail-it0-f65.google.com with SMTP id c11so9485931ith.4 for ; Thu, 01 Mar 2018 14:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GLhc/oZAnnCpqBALhtxstmDsurm+YJJ6jucyT0GWAD8=; b=Y/3/bE7G2ccGQs/t4ybiyUwHUmi+LDuNckkw73Cfmj5CL5NsCyDjfQ1q6l8dpr4Wx3 bB/aXhFxittZ0XGJ68db7ZM+SdREAArxs+pf/YBZQs/wZp/LZpA1r97umIq3mBLnjr8W WBgCsiZUM7JGaTQXT7/FLeJIt6aJxOnyj2Ymk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GLhc/oZAnnCpqBALhtxstmDsurm+YJJ6jucyT0GWAD8=; b=eBaRtjHWE1diXGJOzU2w3ucYk+8oqaoQtXVp1TjmRWLfcj1P096VGQ4jQ9NRiMZLAg 5ZGC2Sq9+Q6lIHEGmeavWEEqlkZDem49l/LlhIOxrpPM8V6FsRBotdnwZliHUY8wzIc+ Z+eCQ5zIgxQI7wE/wDMhRKsSGyhnx4Cvy0akj3kCsmZGxtLa/gwiB5bcnBtb0ZEUFgiC HPZRabTMflV3ps8gPHtCQC3BlL0+K3wBghITT0yfIUHfYWRgcROrIyVysGmeCS9BxBzp byBkOw0NEvwRxkkdloTC0GJguR1TIbvk0n+pPsR1A3g6iPa/aC1HIkQOJN2eo/O8/jG5 qO0w== X-Gm-Message-State: AElRT7FxrGxyCJCjM7YVhfR1hnIdQnIZVD4/OC58rWurAG/ocHnkNUUX oZ7zxwjuyz+X1eEjgT2B+Rd/s0YKLmiulRU2eJPpyw== X-Received: by 10.36.104.1 with SMTP id v1mr4001188itb.70.1519943582452; Thu, 01 Mar 2018 14:33:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.230.25 with HTTP; Thu, 1 Mar 2018 14:33:01 -0800 (PST) In-Reply-To: <20180220181751.20826-1-krzk@kernel.org> References: <20180220181751.20826-1-krzk@kernel.org> From: Linus Walleij Date: Thu, 1 Mar 2018 23:33:01 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: samsung: Validate alias coming from DT To: Krzysztof Kozlowski Cc: Tomasz Figa , Sylwester Nawrocki , Kukjin Kim , Linux ARM , linux-samsung-soc , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Geert Uytterhoeven , stable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 7:17 PM, Krzysztof Kozlowski wrote: > Driver uses alias from Device Tree as an index of pin controller data > array. In case of a wrong DTB or an out-of-tree DTB, the alias could be > outside of this data array leading to out-of-bounds access. > > Depending on binary and memory layout, this could be handled properly > (showing error like "samsung-pinctrl 3860000.pinctrl: driver data not > available") or could lead to exceptions. > > Reported-by: Geert Uytterhoeven > Cc: > Fixes: 30574f0db1b1 ("pinctrl: add samsung pinctrl and gpiolib driver") > Signed-off-by: Krzysztof Kozlowski > > --- > > Issue is present since first version of this driver so this should be > backported as far as possible. > > Tested on Odroid HC1 (Exynos5422). Tests on S3C24xx, S3C64xx, Exynos > ARM64 and any other chips are highly appreciated. > > Linus, > I can take it through samsung/pinctrl tree and later send you again as > pull request... or you can apply it directly as I do not have any other > pinctrl patches queued so far. Patch applied for fixes with all the tags. Yours, Linus Walleij