Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
Cc: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] fbdev: fix potential buffer overflow in do_register_framebuffer()
Date: Sun, 27 Jul 2025 19:43:27 +0200	[thread overview]
Message-ID: <5aad10cc-0ab1-4716-b0fa-afbc73660fd4@gmx.de> (raw)
In-Reply-To: <20250701090704.161165-1-zhangyongzhen@kylinos.cn>

On 7/1/25 11:07, Yongzhen Zhang wrote:
> The current implementation may lead to buffer overflow when:
> 1.  Unregistration creates NULL gaps in registered_fb[]
> 2.  All array slots become occupied despite num_registered_fb < FB_MAX
> 3.  The registration loop exceeds array bounds
> 
> Add boundary check to prevent registered_fb[FB_MAX] access.
> 
> Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
> ---
>   drivers/video/fbdev/core/fbmem.c | 3 +++
>   1 file changed, 3 insertions(+)

applied.

Thanks!
Helge

      reply	other threads:[~2025-07-27 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01  9:07 [PATCH] fbdev: fix potential buffer overflow in do_register_framebuffer() Yongzhen Zhang
2025-07-27 17:43 ` 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=5aad10cc-0ab1-4716-b0fa-afbc73660fd4@gmx.de \
    --to=deller@gmx.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=zhangyongzhen@kylinos.cn \
    /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