Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2500475imm; Mon, 24 Sep 2018 05:32:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZf3/4SvVEczHlCdDf+nmAOf9t0IC0Gt2hJo9HBzcnadE6Ba5b/Sg3KvNCHHB3n2zOonenC X-Received: by 2002:a62:7d8d:: with SMTP id y135-v6mr5787452pfc.245.1537792328661; Mon, 24 Sep 2018 05:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792328; cv=none; d=google.com; s=arc-20160816; b=FrFvwhUNqlWhCqyD1v++iySGSpgL9h+w/beeXhHp6l9VNbB0PskeS1PVmIuKhZI8ZV G/1lVIa5rONcsj/8X8ozdvIwRBj9t1ry2HXGfts7Wm1hnS9GnsFoIWyWl6WEpUF8Os6h 9XWeT1BVCfwZ9ndx0xfSVaoq/GMod7sC/bScOa5HuGedpGbsQ0NGmQ0KLQSpT4xn1D4h jaz/Yx7By+P8iWD21ypjqvYZibzykQqZtsw33R5V3fkdLbvkMeVxCy/dCzvQcmZbnh++ DiFA7Nyp10F29vHOyVLANxgl9gObwYHAJoKcBTJey4O3xGixM/Rrbw4JN1/4lF9vSXGM Nfgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=KmWhOSKb1TI2Kcwfu/hECCC+M0Ib/yyXQrDrskm/wv8=; b=RwKSRgyUpnBQVj/uT/dyoI4kF3sFM7YtAmwROpRuOu1VtsyvjLBU4PDzvdKpadP+r4 h25sq5c9ooz0jHVqXYTGcNaLVTFFOrXVPpgRtcZRGhtMo/LOOmw5HZgeJ089tyoiEBvq 1E3A76+mWzFD7O9GmsJQKrqlyDWBHW+MRoV6R3KntQQcZ5XkOCaokeQZg/cNKQ/JCY5K XT4eFEsdD4O4T/2pBWnNf5SOP4nM/dUfBNL8NhHF0ARF5W+SrlvR7uVz05PGQ1Ii82vd IAmwXdzkpM3IgHiedebRl9yvCuij6jQUrRsxwBco36vL3ajY1B8/YW0h3vXxHFbYK6Xt M56Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9-v6si2221053pgq.382.2018.09.24.05.31.52; Mon, 24 Sep 2018 05:32:08 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387751AbeIXSb2 (ORCPT + 99 others); Mon, 24 Sep 2018 14:31:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57640 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732800AbeIXSb1 (ORCPT ); Mon, 24 Sep 2018 14:31:27 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 620A91099; Mon, 24 Sep 2018 12:29:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Imre Deak , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [PATCH 4.18 051/235] fbdev: omapfb: off by one in omapfb_register_client() Date: Mon, 24 Sep 2018 13:50:37 +0200 Message-Id: <20180924113110.258724456@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit 5ec1ec35b2979b59d0b33381e7c9aac17e159d16 ] The omapfb_register_client[] array has OMAPFB_PLANE_NUM elements so the > should be >= or we are one element beyond the end of the array. Fixes: 8b08cf2b64f5 ("OMAP: add TI OMAP framebuffer driver") Signed-off-by: Dan Carpenter Cc: Imre Deak Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/omap/omapfb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -958,7 +958,7 @@ int omapfb_register_client(struct omapfb { int r; - if ((unsigned)omapfb_nb->plane_idx > OMAPFB_PLANE_NUM) + if ((unsigned)omapfb_nb->plane_idx >= OMAPFB_PLANE_NUM) return -EINVAL; if (!notifier_inited) {