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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7699EC54F51 for ; Wed, 29 Jul 2026 10:55:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5ACE10E035; Wed, 29 Jul 2026 10:55:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="caih/zd4"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id E519F10E035 for ; Wed, 29 Jul 2026 10:55:19 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E445360A65; Wed, 29 Jul 2026 10:55:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18F351F000E9; Wed, 29 Jul 2026 10:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785322518; bh=/Os9/+MEtW2fpvdkzwuK0+rDGtoqz8YS9F0rAcR217w=; h=Subject:To:Cc:From:Date; b=caih/zd4aonXbCziaVD4N6j5ittwufMqBFE83+VHRdwSC6/oxWBikHkeSE147Pixx GZ8FTfCCkmoh+yfOUzmZN/KRessEkQfNz0cWaxpheS+DrXtRyk5Cs5QuojRvlg8pp5 TSNP0IOxn2391JClbq8RZDpPoZNaBcw0cWbGhtdY= Subject: Patch "drm/sysfb: Avoid possible truncation with calculating visible size" has been added to the 7.1-stable tree To: dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, javierm@redhat.com, sashiko-bot@kernel.org, tzimmermann@suse.de Cc: From: Date: Wed, 29 Jul 2026 12:54:27 +0200 Message-ID: <2026072927-corporate-spill-5d6f@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a note to let you know that I've just added the patch titled drm/sysfb: Avoid possible truncation with calculating visible size to the 7.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-sysfb-avoid-possible-truncation-with-calculating-visible-size.patch and it can be found in the queue-7.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From b771974988ec7ce077a7246fa0fa588c246fe581 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 18 Jun 2026 10:41:58 +0200 Subject: drm/sysfb: Avoid possible truncation with calculating visible size From: Thomas Zimmermann commit b771974988ec7ce077a7246fa0fa588c246fe581 upstream. Calculating the visible size of the system framebuffer can result in truncation of the result. The calculation uses 32-bit arithmetics, which can overflow if the values for height and stride are large. Fix the issue by multiplying with mul_u32_u32(). Signed-off-by: Thomas Zimmermann Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays") Fixes: a84eb6abe2b6 ("drm/sysfb: Add vesadrm for VESA displays") Reported-by: Sashiko Closes: https://lore.kernel.org/dri-devel/20260617114027.1F2A71F000E9@smtp.kernel.org/ Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: dri-devel@lists.freedesktop.org Cc: # v6.16+ Reviewed-by: Javier Martinez Canillas Link: https://patch.msgid.link/20260618084327.46567-3-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c +++ b/drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -73,7 +74,7 @@ EXPORT_SYMBOL(drm_sysfb_get_stride_si); u64 drm_sysfb_get_visible_size_si(struct drm_device *dev, const struct screen_info *si, unsigned int height, unsigned int stride, u64 size) { - u64 vsize = height * stride; + u64 vsize = mul_u32_u32(height, stride); return drm_sysfb_get_validated_size0(dev, "visible size", vsize, size); } Patches currently in stable-queue which might be from tzimmermann@suse.de are queue-7.1/drm-tests-shmem-set-dma-mask-to-64-bit-in-drm_gem_sh.patch queue-7.1/drm-exynos-fbdev-remove-offset-into-screen_buffer.patch queue-7.1/drm-sysfb-avoid-possible-truncation-with-calculating-visible-size.patch queue-7.1/drm-tegra-fbdev-remove-offset-into-framebuffer-memory.patch queue-7.1/drm-sysfb-do-not-page-align-visible-size-of-the-framebuffer.patch queue-7.1/drm-sysfb-return-errno-code-from-drm_sysfb_get_visible_size.patch queue-7.1/drm-sysfb-avoid-truncating-maximum-stride.patch