From: Greg KH <gregkh@linuxfoundation.org>
To: WangYuli <wangyuli@uniontech.com>
Cc: alexander.usyskin@intel.com, arnd@arndb.de,
linux-kernel@vger.kernel.org, zhanjun@uniontech.com,
niecheng1@uniontech.com, guanwentao@uniontech.com
Subject: Re: [PATCH] mei: vsc: fix potential array bounds violation in ACE address allocation
Date: Sun, 17 Aug 2025 13:10:04 +0200 [thread overview]
Message-ID: <2025081712-tweet-repressed-2aee@gregkh> (raw)
In-Reply-To: <78151482AFE8973A+20250801090600.544000-1-wangyuli@uniontech.com>
On Fri, Aug 01, 2025 at 05:06:00PM +0800, WangYuli wrote:
> When ACE images require dynamic address allocation, the code accesses
> frags[frag_index - 1] without bounds checking. This could lead to:
>
> - Array underflow if frag_index is 0
How can that happen? It's coming directly from a static array in the
code itself that it declared right above these lines?
> - Use of uninitialized fragment data for address calculations
Where will that come from?
> - Silent failures in address allocation
Where?
> Add proper validation before accessing the previous fragment and
> provide clear error messages when validation fails.
But how can any of this really happen? If it does, it's a bug in the
code that people added. So why is any of this needed to the code today?
How did you hit any of the above, and how was this patch tested?
thanks,
greg k-h
prev parent reply other threads:[~2025-08-17 11:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 9:06 [PATCH] mei: vsc: fix potential array bounds violation in ACE address allocation WangYuli
2025-08-01 9:29 ` Greg KH
2025-08-17 11:10 ` 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=2025081712-tweet-repressed-2aee@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--cc=arnd@arndb.de \
--cc=guanwentao@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=niecheng1@uniontech.com \
--cc=wangyuli@uniontech.com \
--cc=zhanjun@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