From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB4D1C6FA82 for ; Tue, 20 Sep 2022 17:44:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229691AbiITRoh (ORCPT ); Tue, 20 Sep 2022 13:44:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbiITRog (ORCPT ); Tue, 20 Sep 2022 13:44:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 249A965B6 for ; Tue, 20 Sep 2022 10:44:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B79FB625B0 for ; Tue, 20 Sep 2022 17:44:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA128C433D6; Tue, 20 Sep 2022 17:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663695874; bh=xkaGSrs0Th5sRStyC6w5uA1QGT3bAp9Lx8pe7nInHXo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WKMJB3vO20S/7QdVGNumg99v6DmCt33C3wDZIs1BRMp+q3oTbjgQDwhcl3/WQ0b9e W3Yr6+vSAEDaOeAnWiZW0uBolRDqsghWgLnLAIKq9h0wTXBaZzwPtTFtsKE9bCw8Mr Uiys/p2mJT8vZhxDcm2WB8h4NZ0dbHU6qzyalX6w= Date: Tue, 20 Sep 2022 19:44:31 +0200 From: Greg KH To: Stefan Ghinea Cc: stable@vger.kernel.org, Zheyu Ma , Helge Deller Subject: Re: [PATCH 5.10 1/1] video: fbdev: i740fb: Error out if 'pixclock' equals zero Message-ID: References: <20220919210302.29792-1-stefan.ghinea@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220919210302.29792-1-stefan.ghinea@windriver.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Sep 20, 2022 at 12:03:02AM +0300, Stefan Ghinea wrote: > From: Zheyu Ma > > commit 15cf0b82271b1823fb02ab8c377badba614d95d5 upstream > > The userspace program could pass any values to the driver through > ioctl() interface. If the driver doesn't check the value of 'pixclock', > it may cause divide error. > > Fix this by checking whether 'pixclock' is zero in the function > i740fb_check_var(). > > The following log reveals it: > > divide error: 0000 [#1] PREEMPT SMP KASAN PTI > RIP: 0010:i740fb_decode_var drivers/video/fbdev/i740fb.c:444 [inline] > RIP: 0010:i740fb_set_par+0x272f/0x3bb0 drivers/video/fbdev/i740fb.c:739 > Call Trace: > fb_set_var+0x604/0xeb0 drivers/video/fbdev/core/fbmem.c:1036 > do_fb_ioctl+0x234/0x670 drivers/video/fbdev/core/fbmem.c:1112 > fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1191 > vfs_ioctl fs/ioctl.c:51 [inline] > __do_sys_ioctl fs/ioctl.c:874 [inline] > > Signed-off-by: Zheyu Ma > Signed-off-by: Helge Deller > Signed-off-by: Stefan Ghinea > --- > drivers/video/fbdev/i740fb.c | 3 +++ > 1 file changed, 3 insertions(+) Both backports now queued up, thanks. greg k-h