[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03796e70-edd9-a6b5-525f-db6f9431aafe@c64.rulez.org>
Date: Wed, 19 Nov 2025 22:05:16 +0100
From: Kajtár Zsolt <soci@....rulez.org>
To: ssrane_b23@...vjti.ac.in, Simona Vetter <simona@...ll.ch>,
Helge Deller <deller@....de>
Cc: linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
syzbot+5a40432dfe8f86ee657a@...kaller.appspotmail.com
Subject: Re: [PATCH] fbdev: core: Fix vmalloc-out-of-bounds in fb_imageblit
Hello!
> This patch replaces the insufficient check with a more precise one. It
> calculates the effective width in bytes of the image (accounting for
> clipping against xres_virtual) and ensures that the last byte of the
> operation falls within the screen buffer. Specifically, it checks if
> '(dy + height - 1) * line_length + effective_width_bytes' exceeds
> screen_size. If it does, the drawing height max_y is reduced to
> prevent the out-of-bounds access.
I know my opinion doesn't count much but would like make a note.
Any bound checks which are applied here or at the entry of the other 2
low level drawing routines are just masking an issue somewhere in the
console code. The text area should be entirely within bounds of the
screen memory. If that's always the case then there shouldn't be any
drawing request outside of the framebuffer either.
Please consider at least to add a warning instead of silent clipping, as
every time such clipping was done it was a result of a bug.
--
-soci-
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists