From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Dikshita Agarwal <quic_dikshita@quicinc.com>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vedang Nagar <quic_vnagar@quicinc.com>
Subject: Re: [PATCH v3 2/2] media: venus: Fix OOB read due to missing payload bound check
Date: Sat, 17 May 2025 22:41:33 +0100 [thread overview]
Message-ID: <f39310ec-ff30-45b4-ae80-768f252b7ed5@linaro.org> (raw)
In-Reply-To: <20250514-venus-fixes-v3-2-32298566011f@quicinc.com>
On 14/05/2025 14:38, Dikshita Agarwal wrote:
> From: Vedang Nagar <quic_vnagar@quicinc.com>
>
> Currently, The event_seq_changed() handler processes a variable number
> of properties sent by the firmware. The number of properties is indicated
> by the firmware and used to iterate over the payload. However, the
> payload size is not being validated against the actual message length.
>
> This can lead to out-of-bounds memory access if the firmware provides a
> property count that exceeds the data available in the payload. Such a
> condition can result in kernel crashes or potential information leaks if
> memory beyond the buffer is accessed.
>
> Fix this by properly validating the remaining size of the payload before
> each property access and updating bounds accordingly as properties are
> parsed.
>
> This ensures that property parsing is safely bounded within the received
> message buffer and protects against malformed or malicious firmware
> behavior.
>
> Fixes: 09c2845e8fe4 ("[media] media: venus: hfi: add Host Firmware Interface (HFI)")
> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> Co-developed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next prev parent reply other threads:[~2025-05-17 21:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 13:38 [PATCH v3 0/2] venus driver fixes for vulnerabilities due to unexpected firmware payload Dikshita Agarwal
2025-05-14 13:38 ` [PATCH v3 1/2] media: venus: fix TOCTOU vulnerability when reading packets from shared memory Dikshita Agarwal
2025-05-15 9:17 ` Bryan O'Donoghue
2025-05-15 9:56 ` Vikash Garodia
2025-05-15 10:28 ` Bryan O'Donoghue
2025-05-15 12:11 ` Vikash Garodia
2025-05-15 12:47 ` Bryan O'Donoghue
2025-05-15 13:23 ` Vikash Garodia
2025-05-15 17:51 ` Bryan O'Donoghue
2025-05-15 18:25 ` Vikash Garodia
2025-05-16 10:11 ` Bryan O'Donoghue
2025-05-14 13:38 ` [PATCH v3 2/2] media: venus: Fix OOB read due to missing payload bound check Dikshita Agarwal
2025-05-17 21:41 ` Bryan O'Donoghue [this message]
2025-05-18 3:56 ` Vikash Garodia
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=f39310ec-ff30-45b4-ae80-768f252b7ed5@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=hans.verkuil@cisco.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=quic_vnagar@quicinc.com \
--cc=stanimir.varbanov@linaro.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