From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@linux.ie, daniel@ffwll.ch
Cc: "Nuno Gonçalves" <nunojpg@gmail.com>,
stable@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/fb-helper: Fix out-of-bounds access
Date: Thu, 23 Jun 2022 09:57:19 +0200 [thread overview]
Message-ID: <12f3bfc9-e7eb-0570-adfd-0ad0e39df91d@redhat.com> (raw)
In-Reply-To: <20220621104617.8817-1-tzimmermann@suse.de>
Hello Thomas,
On 6/21/22 12:46, Thomas Zimmermann wrote:
> Clip memory range to screen-buffer size to avoid out-of-bounds access
> in fbdev deferred I/O's damage handling.
>
> Fbdev's deferred I/O can only track pages. From the range of pages, the
> damage handler computes the clipping rectangle for the display update.
> If the fbdev screen buffer ends near the beginning of a page, that page
> could contain more scanlines. The damage handler would then track these
> non-existing scanlines as dirty and provoke an out-of-bounds access
> during the screen update. Hence, clip the maximum memory range to the
> size of the screen buffer.
>
> While at it, rename the variables min/max to min_off/max_off in
> drm_fb_helper_deferred_io(). This avoids confusion with the macros of
> the same name.
>
> Reported-by: Nuno Gonçalves <nunojpg@gmail.com>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Tested-by: Nuno Gonçalves <nunojpg@gmail.com>
> Fixes: 67b723f5b742 ("drm/fb-helper: Calculate damaged area in separate helper")
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Javier Martinez Canillas <javierm@redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: <stable@vger.kernel.org> # v5.18+
> ---
This makes sense to me.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
next prev parent reply other threads:[~2022-06-23 7:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 10:46 [PATCH] drm/fb-helper: Fix out-of-bounds access Thomas Zimmermann
2022-06-23 7:57 ` Javier Martinez Canillas [this message]
2022-06-29 18:17 ` Geert Uytterhoeven
2022-06-30 6:37 ` Thomas Zimmermann
2024-10-21 13:03 ` drm/fbdev-dma: regression Nuno Gonçalves
2024-11-11 11:51 ` Thorsten Leemhuis
2024-11-11 13:22 ` Thomas Zimmermann
2024-11-11 13:42 ` Nuno Gonçalves
2024-11-11 14:37 ` Thomas Zimmermann
2024-11-11 19:06 ` Nuno Gonçalves
2024-11-12 8:11 ` Thomas Zimmermann
2024-11-28 15:47 ` Thomas Zimmermann
2024-11-28 23:37 ` Nuno Gonçalves
2024-12-02 11:18 ` Thomas Zimmermann
2024-12-07 22:36 ` Nuno Gonçalves
2024-12-09 13:43 ` Thomas Zimmermann
2024-12-09 13:56 ` Nuno Gonçalves
2024-12-11 9:07 ` Thomas Zimmermann
2025-02-26 22:57 ` Nuno Gonçalves
2025-02-27 9:01 ` Thomas Zimmermann
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=12f3bfc9-e7eb-0570-adfd-0ad0e39df91d@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nunojpg@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/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