From: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
To: Muhammad Bilal <meatuni001@gmail.com>
Cc: carl.vanderlip@oss.qualcomm.com, ogabbay@kernel.org,
dan.carpenter@linaro.org, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] accel/qaic: use sizeof(*trans_hdr) for transaction length check
Date: Wed, 29 Jul 2026 14:58:36 -0600 [thread overview]
Message-ID: <20a19c5e-6f1b-4549-8a72-a8a99126f73e@oss.qualcomm.com> (raw)
In-Reply-To: <20260617212520.59801-1-meatuni001@gmail.com>
On 6/17/2026 3:25 PM, Muhammad Bilal wrote:
> In encode_message() the per-transaction lower-bound check compares
> trans_hdr->len against sizeof(trans_hdr), i.e. the size of the pointer,
> instead of sizeof(*trans_hdr), the size of struct qaic_manage_trans_hdr.
>
> Every other length check in this file (encode_message() at the loop
> guard, decode_message(), etc.) correctly uses sizeof(*trans_hdr), so
> this is an inconsistency. On 64-bit builds the pointer and the struct
> are both 8 bytes, so the check is correct by coincidence and there is
> no behavioural change. On 32-bit builds the pointer is 4 bytes, which
> weakens the minimum-length check below the 8-byte header size.
>
> Use sizeof(*trans_hdr) so the check validates against the actual
> transaction header size on all builds.
>
> Fixes: ea33cb6fc278 ("accel/qaic: tighten bounds checking in encode_message()")
> Signed-off-by: Muhammad Bilal <meatuni001@gmail.com>
Applied to drm-misc-fixes
-Jeff
prev parent reply other threads:[~2026-07-29 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 21:25 Muhammad Bilal
2026-07-29 20:52 ` Jeff Hugo
2026-07-29 20:58 ` Jeff Hugo [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=20a19c5e-6f1b-4549-8a72-a8a99126f73e@oss.qualcomm.com \
--to=jeff.hugo@oss.qualcomm.com \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meatuni001@gmail.com \
--cc=ogabbay@kernel.org \
/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
all inboxes | Powered by JetHome®