Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6262947imu; Mon, 21 Jan 2019 06:03:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN4QAptBKQfZjA3BsFJJMiFPCpG37HzgA8BPV1uag58y/f/FlImU0WqTJ+r0q5nGjwlHYn7T X-Received: by 2002:a17:902:b78b:: with SMTP id e11mr30467858pls.90.1548079418894; Mon, 21 Jan 2019 06:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079418; cv=none; d=google.com; s=arc-20160816; b=VXPscgxVXSZeIzuRxMp+62PfmFUfddcdkAysR7WNvcJmXg1WH4fH/0ur/FGbM6o8Eb HBe9EYTr5Y23iiLGVLfPGpddoftLCPloqnwiqbSA1BhRUlyaBeoLpebwJmjk3d96SNRr C7wLIX3ak6LvbkgLEyz6MGQVcQkY3aGzeL+1WheeXGmpgpnRY+XHCZ+FZwmT3l4oiq7L gMjnLFsakATdHhX4H371FaADAZNdc1rrVOhOnyflzoc77Rtm2v8uUpTb0ij++a1uIwY/ kxJHBuhbuoBobmw5JirqLyc1lTlpf3iK1YbW8R6Pj7NXop1RCmftSfC+tiacDhiJPmL9 rTQA== 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:dkim-signature; bh=dClJs9Ygaylq29KffpPj/omYJqtVi1gBD9lfedy/Ffo=; b=GrpdXaGYwUhTYII4fhrmwTdkuk5oQJNjtXmlNFvdWEoRBi19AdjlU06f7chQgl2mkb avP3zqHyl8dgCHfG+W6kCvYJn3L1V0T6kKLUwWAr0ovR0jbh6vGgD1wZE1Bf0lY3KKSU BDYVRqaIvTPcDdA1LfRYjXF73G3KbxuJvk3z8FhZwsfWFtb/NZ6OP9sLJpp8Tub4BL/v 80P2ONhQCltgLWLkOKDCobyVvAJAlsfWeJPLSbaDA0jnTYUIvuMdR604Z3+HfJMc/Z96 mrMqcZf60YRj0sCJF4z3QyfdSVnFUlEk8x39/GZ9F9IWm1V0AHJvDIPCTy14Rn/ojSb0 NU/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kcKy6GMb; 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 9si7221213pgm.112.2019.01.21.06.03.13; Mon, 21 Jan 2019 06:03:38 -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=@kernel.org header.s=default header.b=kcKy6GMb; 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 S1732560AbfAUOBE (ORCPT + 99 others); Mon, 21 Jan 2019 09:01:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:47936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732099AbfAUOBB (ORCPT ); Mon, 21 Jan 2019 09:01:01 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA5F02084C; Mon, 21 Jan 2019 14:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548079261; bh=9G4wA0261+V50vaxRwCUIJsVvAKQJLWambaTq0ElsDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kcKy6GMbr7T3aTMJOXsS4crdOxJXVzOsmoW9maJmf5Fb0G/QyfBOV8Yg6zPqY/dtb 6nV1RfVGo7NEHhsrkSv2s+uEAFbuNLY+jNk9/I74XWUzqXMW/PZc39jGKa2leefgrr WwPurbFuph5jsDna3htVuEvGIRCKAGqBo9r60lpM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans Verkuil , syzbot+57c3d83d71187054d56f@syzkaller.appspotmail.com, Mauro Carvalho Chehab Subject: [PATCH 4.19 63/99] media: vivid: set min width/height to a value > 0 Date: Mon, 21 Jan 2019 14:48:55 +0100 Message-Id: <20190121134916.365872390@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121134913.924726465@linuxfoundation.org> References: <20190121134913.924726465@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans Verkuil commit 9729d6d282a6d7ce88e64c9119cecdf79edf4e88 upstream. The capture DV timings capabilities allowed for a minimum width and height of 0. So passing a timings struct with 0 values is allowed and will later cause a division by zero. Ensure that the width and height must be >= 16 to avoid this. Signed-off-by: Hans Verkuil Reported-by: syzbot+57c3d83d71187054d56f@syzkaller.appspotmail.com Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vivid/vivid-vid-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/platform/vivid/vivid-vid-common.c +++ b/drivers/media/platform/vivid/vivid-vid-common.c @@ -21,7 +21,7 @@ const struct v4l2_dv_timings_cap vivid_d .type = V4L2_DV_BT_656_1120, /* keep this initialization for compatibility with GCC < 4.4.6 */ .reserved = { 0 }, - V4L2_INIT_BT_TIMINGS(0, MAX_WIDTH, 0, MAX_HEIGHT, 14000000, 775000000, + V4L2_INIT_BT_TIMINGS(16, MAX_WIDTH, 16, MAX_HEIGHT, 14000000, 775000000, V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CVT | V4L2_DV_BT_STD_GTF, V4L2_DV_BT_CAP_PROGRESSIVE | V4L2_DV_BT_CAP_INTERLACED)