Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp535693ybh; Wed, 15 Jul 2020 08:29:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKRA/EvtwjXkpjwP2yMjwF+DTV7b8LM7+iL/3ppLp530plfX8Sl/dhk893RPnRwOSEpBGN X-Received: by 2002:aa7:c90a:: with SMTP id b10mr146960edt.71.1594826998133; Wed, 15 Jul 2020 08:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594826998; cv=none; d=google.com; s=arc-20160816; b=ich5c7FEmGMSHjO5UEVkl1St1vwabNEMb7MyHJedmNcPKof0xo58xcDEpSJxmkHFiD NrjrWfbT6aadJCQ7H+HXs1uHk0Q81l5snemn31NCsjBMctZ4l/wDi/jxyzxo6IpDnslP dZzg/ZsrqnyE5rLVJd2sQ04gQLNMBarGN70Zv2FS+EyEvld6w2AOdPmuZhgGYJEpxUQ4 DTLCejupUyH5v13xbhwaQi1544mgw3sAarUbmlcF8yZ0gy9R5kqe4eZBtQnsSIwECI4N sewz7rzU8S8WZ8VQQk92j4g8RiHIpua58AHMT06TdoX39IUJVh9gkb0tz/EC7HhImW4S M2DQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=L4iHgVLH2Esu1HTNqT4gLpbzX0jgGf0g30CIjQn2PXU=; b=rriTdoLlDYLo73VIKO9EzEph6KSv2zqgT+P66zOJXZ2lNPWjGVjogB6Krvogq0UNuE 3N4qHAyFuh2zW2+gGpHMq0q7jMKUptiPyBlBiH/cfrETJcdE9Z32abEk+34JhYDZo5Rq OOm6HGzNAiwL9HtUfNw3l8ZvT6GUuHtTTkAmUA6KBr5ICj6mAO1Tlm+8/y4dPJQv5ERr kreRxavjZh21e3xE+d0HStrL+fjjWUUXnw2MxWQIWBCVQzL/8t9ZfDiHlBD36hbxPcZX 8EYycScJQ7jrkYqavvnBmLe1G9umbLDoD8eg4kmQWXptyGPLuDvIeAGT+xgk2bHPWLx6 gsqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si1482252edo.473.2020.07.15.08.29.35; Wed, 15 Jul 2020 08:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgGOP3D (ORCPT + 99 others); Wed, 15 Jul 2020 11:29:03 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:61198 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgGOP3D (ORCPT ); Wed, 15 Jul 2020 11:29:03 -0400 Received: from fsav101.sakura.ne.jp (fsav101.sakura.ne.jp [27.133.134.228]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 06FFT1XC042748; Thu, 16 Jul 2020 00:29:01 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav101.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav101.sakura.ne.jp); Thu, 16 Jul 2020 00:29:01 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav101.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 06FFT1MI042742 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Jul 2020 00:29:01 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH v2] fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins. To: Dan Carpenter Cc: Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Jiri Slaby , Dmitry Vyukov , George Kennedy , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot References: <20200715015102.3814-1-penguin-kernel@I-love.SAKURA.ne.jp> <20200715094836.GD2571@kadam> <9e6eac10-c5c3-f518-36cc-9ea32fb5d7fe@i-love.sakura.ne.jp> <20200715151220.GE2571@kadam> From: Tetsuo Handa Message-ID: Date: Thu, 16 Jul 2020 00:29:00 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200715151220.GE2571@kadam> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/07/16 0:12, Dan Carpenter wrote: > I've complained about integer overflows in fbdev for a long time... > > What I'd like to see is something like the following maybe. I don't > know how to get the vc_data in fbmem.c so it doesn't include your checks > for negative. Yes. Like I said "Thus, I consider that we need more sanity/constraints checks." at https://lore.kernel.org/lkml/b1e7dd6a-fc22-bba8-0abb-d3e779329bce@i-love.sakura.ne.jp/ , we want basic checks. That's a task for fbdev people who should be familiar with necessary constraints. Anyway, my two patches are small and low cost; can we apply these patches regardless of basic checks?