From: Greg KH <gregkh@linuxfoundation.org>
To: Stefan Ghinea <stefan.ghinea@windriver.com>
Cc: stable@vger.kernel.org, Zheyu Ma <zheyuma97@gmail.com>,
Helge Deller <deller@gmx.de>
Subject: Re: [PATCH 5.10 1/1] video: fbdev: i740fb: Error out if 'pixclock' equals zero
Date: Tue, 20 Sep 2022 19:44:31 +0200 [thread overview]
Message-ID: <Yyn7/wECKwE+djII@kroah.com> (raw)
In-Reply-To: <20220919210302.29792-1-stefan.ghinea@windriver.com>
On Tue, Sep 20, 2022 at 12:03:02AM +0300, Stefan Ghinea wrote:
> From: Zheyu Ma <zheyuma97@gmail.com>
>
> 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 <zheyuma97@gmail.com>
> Signed-off-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
> ---
> drivers/video/fbdev/i740fb.c | 3 +++
> 1 file changed, 3 insertions(+)
Both backports now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-09-20 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 21:03 [PATCH 5.10 1/1] video: fbdev: i740fb: Error out if 'pixclock' equals zero Stefan Ghinea
2022-09-20 17:44 ` Greg KH [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=Yyn7/wECKwE+djII@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=deller@gmx.de \
--cc=stable@vger.kernel.org \
--cc=stefan.ghinea@windriver.com \
--cc=zheyuma97@gmail.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