Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6258380imu; Mon, 21 Jan 2019 06:00:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ygNsyLYKSV4+k9VJoSsG39n6eQ4+Z3UWHFrd7YwUCJOdP+xxdjmxWnDw9ObDr3IC45baH X-Received: by 2002:a63:2b01:: with SMTP id r1mr27985117pgr.432.1548079224323; Mon, 21 Jan 2019 06:00:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079224; cv=none; d=google.com; s=arc-20160816; b=X7WavXWvfIUktU2EvZy30zQIfHCfAc+/UOW+YgPJZ3nKwXwGGbOSvQev+m751lbhB1 CDdKb4wrM5YsnMSQ3Qapg6d8EbHCvAwKWkROnh9okGmt9Us+Hs+YQkHzxCcL4KQIHJeP O/5lG0UJZmPUMI1QXmKWO6QY7NFLyUYlBcFLJ57CuH2jw69EFAdrzRkdw7SxlbbNL0kt 7bUipFRXcfuims/J6Ki3vMDfwDYO29vjb1vT1FyBRcfrB08nJbApwY8LtZlZDmm3/eIl fkhMw2FDISTG43GDYmSuWIoThvsbz70hq21JikU/hZSURs53IG7IMPO+yA84BNf3ZBY3 i0wQ== 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=kJIInO6uNkF++/hfwLKsKpm2wDYr71u0BnwPwFG9024=; b=ML807eOJMEO/dN8LEiBLHqYx/4Bpsl0OpsWB4mJpqn/DeymEfZdII3GergGxnuFIar KWrz+Z4Qx4dfk1SIAoW8l+2iisIThsXfk5/8xjmsG0/zFJmlLUQc/DMTNN8CAbqEgSn0 oQ/0LU+ho8Plh7TGeACBMQhwhiurNdvjGuqheK+nK0Wx2Eyj2HMsHi3vP7UNlDQMQVAo GksBkVWiemnEWhtPRabWIyPQyxkqvblkfjrus6XLNqT4bkBKoknBBp1JSzwvSkfZ9D2t rTkPT+UXlPo0skWRAzskBQouZemGDvWdfcK21LgSCA8X84gl8rRq5MI2iqfKgWCWfQY2 t9nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hutQTr3v; 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 z71si12795645pgd.490.2019.01.21.06.00.08; Mon, 21 Jan 2019 06:00:24 -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=hutQTr3v; 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 S1731834AbfAUNzy (ORCPT + 99 others); Mon, 21 Jan 2019 08:55:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:40686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731824AbfAUNzv (ORCPT ); Mon, 21 Jan 2019 08:55:51 -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 974B620879; Mon, 21 Jan 2019 13:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548078951; bh=29oyCsl7bRyCOHU8lCgOGwzYeKIPNulKREMcUNg2icM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hutQTr3vNYR/UzoLqDqZMufCqdcAqGopX18ykKLAmpiRES3jT8Kml7BC3Sq2PmG2P teW9zTtKszuUQt5hhtb6ji+UDyU09pzS4iv3+H6gsgidcskiesy92TrriWCEwY2ECP FKjybEIbLodqHbcSpLSIGiDJhlbnDygGPsW61sO4= 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.9 33/51] media: vivid: set min width/height to a value > 0 Date: Mon, 21 Jan 2019 14:44:29 +0100 Message-Id: <20190121122456.816369975@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121122453.700446926@linuxfoundation.org> References: <20190121122453.700446926@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.9-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 @@ -33,7 +33,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)