mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Xue Haolin <xuehaolin@uniontech.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fbdev: sstfb: Error out if pixclock equals zero
Date: Wed, 18 Nov 2026 19:55:44 +0100	[thread overview]
Message-ID: <24df7648-5126-46f7-862d-9279b9523be4@gmx.de> (raw)
In-Reply-To: <20261117031714.259053-1-xuehaolin@uniontech.com>

On 11/17/26 04:17, Xue Haolin wrote:
> 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-by-zero error.
> 
> sstfb_check_var() calls PICOS2KHZ(var->pixclock) which expands to
> 1000000000UL / var->pixclock. If var->pixclock is zero, this causes
> a divide-by-zero exception.
> 
> Fix this by checking whether pixclock is zero at the beginning of
> sstfb_check_var(), before it is used as a divisor.
> 
> This is similar to CVE-2022-3061 in i740fb which was fixed by
> commit 15cf0b82271b ("video: fbdev: i740fb: Error out if
> 'pixclock' equals zero"), and the fix in savagefb by
> commit 04e5eac8f3ab ("fbdev: savage: Error out if pixclock equals zero").
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xue Haolin <xuehaolin@uniontech.com>
> ---
> Changes in v2:
> - Fix sign-off to use real name "Xue Haolin" to satisfy DCO.
> 
>   drivers/video/fbdev/sstfb.c | 3 +++
>   1 file changed, 3 insertions(+)

applied.

Thanks!
Helge


      reply	other threads:[~2026-11-18 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  2:20 [PATCH] " Xue Haolin
2026-11-17  3:17 ` [PATCH v2] " Xue Haolin
2026-11-18 18:55   ` Helge Deller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24df7648-5126-46f7-862d-9279b9523be4@gmx.de \
    --to=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xuehaolin@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®