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 5D173C636D3 for ; Tue, 31 Jan 2023 14:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232134AbjAaOvX (ORCPT ); Tue, 31 Jan 2023 09:51:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbjAaOvU (ORCPT ); Tue, 31 Jan 2023 09:51:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382B015546; Tue, 31 Jan 2023 06:51:19 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id DD02BB81D1C; Tue, 31 Jan 2023 14:51:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A1D6C4339C; Tue, 31 Jan 2023 14:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1675176676; bh=nsoBopMAz4duSNJoBKEMLJBHGuAUe6NkWDgn9CCh3/4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=jrZ5LzfK8AEfiC/TmgzXeNEONR4Mq4jatwVKbFU4gGz0Mw2kq/x9arXRqUqNGOBWU o7sWjlV4GDDw2bcEe3Nol5ovWozKWP2yTpn3LhSjh0FGJQX7p5hMBb1bwDIPNCaWk5 Lhcu71W618BwJcpkjBs3TP27/tZdvySzpSzbr0Ak= Date: Tue, 31 Jan 2023 15:51:13 +0100 From: Greg KH To: Samuel Thibault , Daniel Vetter , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Sanan Hasanov Subject: Re: [PATCHv2] fbcon: Check font dimension limits Message-ID: References: <20230129151740.x5p7jj2pbuilpzzt@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230129151740.x5p7jj2pbuilpzzt@begin> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 29, 2023 at 04:17:40PM +0100, Samuel Thibault wrote: > blit_x and blit_y are u32, so fbcon currently cannot support fonts > larger than 32x32. > > The 32x32 case also needs shifting an unsigned int, to properly set bit > 31, otherwise we get "UBSAN: shift-out-of-bounds in fbcon_set_font", > as reported on: > > http://lore.kernel.org/all/IA1PR07MB98308653E259A6F2CE94A4AFABCE9@IA1PR07MB9830.namprd07.prod.outlook.com > Kernel Branch: 6.2.0-rc5-next-20230124 > Kernel config: https://drive.google.com/file/d/1F-LszDAizEEH0ZX0HcSR06v5q8FPl2Uv/view?usp=sharing > Reproducer: https://drive.google.com/file/d/1mP1jcLBY7vWCNM60OMf-ogw-urQRjNrm/view?usp=sharing > > Reported-by: Sanan Hasanov > Signed-off-by: Samuel Thibault > Fixes: 2d2699d98492 ("fbcon: font setting should check limitation of driver") > Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman