<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/platform/qcom, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-28T14:21:35Z</updated>
<entry>
<title>media: venus: hfi: explicitly release IRQ during teardown</title>
<updated>2025-08-28T14:21:35Z</updated>
<author>
<name>Jorge Ramirez-Ortiz</name>
</author>
<published>2025-08-23T03:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8226db2309e20928d04b33707289f82c00ca71ed'/>
<id>urn:sha1:8226db2309e20928d04b33707289f82c00ca71ed</id>
<content type='text'>
[ Upstream commit 640803003cd903cea73dc6a86bf6963e238e2b3f ]

Ensure the IRQ is disabled - and all pending handlers completed - before
dismantling the interrupt routing and clearing related pointers.

This prevents any possibility of the interrupt triggering after the
handler context has been invalidated.

Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
Cc: stable@vger.kernel.org
Signed-off-by: Jorge Ramirez-Ortiz &lt;jorge.ramirez@oss.qualcomm.com&gt;
Reviewed-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt;
Tested-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt; # RB5
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
[ Adjust context ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: protect against spurious interrupts during probe</title>
<updated>2025-08-28T14:21:35Z</updated>
<author>
<name>Jorge Ramirez-Ortiz</name>
</author>
<published>2025-08-23T04:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18c2b2bd982b8546312c9a7895515672169f28e0'/>
<id>urn:sha1:18c2b2bd982b8546312c9a7895515672169f28e0</id>
<content type='text'>
[ Upstream commit 3200144a2fa4209dc084a19941b9b203b43580f0 ]

Make sure the interrupt handler is initialized before the interrupt is
registered.

If the IRQ is registered before hfi_create(), it's possible that an
interrupt fires before the handler setup is complete, leading to a NULL
dereference.

This error condition has been observed during system boot on Rb3Gen2.

Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Cc: stable@vger.kernel.org
Signed-off-by: Jorge Ramirez-Ortiz &lt;jorge.ramirez@oss.qualcomm.com&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Reviewed-by: Vikash Garodia &lt;quic_vgarodia@quicinc.com&gt;
Reviewed-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt;
Tested-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt; # RB5
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
[ kept hfi_isr_thread instead of venus_isr_thread ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: qcom: camss: cleanup media device allocated resource on error path</title>
<updated>2025-08-28T14:21:35Z</updated>
<author>
<name>Vladimir Zapolskiy</name>
</author>
<published>2025-08-23T04:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e23a595f1162dbff1ba009765e118e2c064bbab'/>
<id>urn:sha1:7e23a595f1162dbff1ba009765e118e2c064bbab</id>
<content type='text'>
[ Upstream commit 69080ec3d0daba8a894025476c98ab16b5a505a4 ]

A call to media_device_init() requires media_device_cleanup() counterpart
to complete cleanup and release any allocated resources.

This has been done in the driver .remove() right from the beginning, but
error paths on .probe() shall also be fixed.

Fixes: a1d7c116fcf7 ("media: camms: Add core files")
Cc: stable@vger.kernel.org
Signed-off-by: Vladimir Zapolskiy &lt;vladimir.zapolskiy@linaro.org&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
[ err_genpd_cleanup =&gt; err_cleanup ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: vdec: Clamp param smaller than 1fps and bigger than 240.</title>
<updated>2025-08-28T14:21:35Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2025-08-23T12:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6242f1a36109cc7f9d1236c228543e841fa83a6d'/>
<id>urn:sha1:6242f1a36109cc7f9d1236c228543e841fa83a6d</id>
<content type='text'>
[ Upstream commit 377dc500d253f0b26732b2cb062e89668aef890a ]

The driver uses "whole" fps in all its calculations (e.g. in
load_per_instance()). Those calculation expect an fps bigger than 1, and
not big enough to overflow.

Clamp the value if the user provides a param that will result in an invalid
fps.

Reported-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Closes: https://lore.kernel.org/linux-media/f11653a7-bc49-48cd-9cdb-1659147453e4@xs4all.nl/T/#m91cd962ac942834654f94c92206e2f85ff7d97f0
Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
Cc: stable@vger.kernel.org
Tested-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt; # qrb5615-rb5
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
[bod: Change "parm" to "param"]
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
[ Adjust context in header ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: Add a check for packet size after reading from shared memory</title>
<updated>2025-08-28T14:21:32Z</updated>
<author>
<name>Vedang Nagar</name>
</author>
<published>2025-05-19T07:12:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0520c89f6280d2b60ab537d5743601185ee7d8ab'/>
<id>urn:sha1:0520c89f6280d2b60ab537d5743601185ee7d8ab</id>
<content type='text'>
commit 49befc830daa743e051a65468c05c2ff9e8580e6 upstream.

Add a check to ensure that the packet size does not exceed the number of
available words after reading the packet header from shared memory. This
ensures that the size provided by the firmware is safe to process and
prevent potential out-of-bounds memory access.

Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
Cc: stable@vger.kernel.org
Signed-off-by: Vedang Nagar &lt;quic_vnagar@quicinc.com&gt;
Co-developed-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt;
Signed-off-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: hfi_parser: add check to avoid out of bound access</title>
<updated>2025-05-02T05:39:15Z</updated>
<author>
<name>Vikash Garodia</name>
</author>
<published>2025-02-20T17:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5133a0b25463674903fdc0528e0a29b7267130e'/>
<id>urn:sha1:e5133a0b25463674903fdc0528e0a29b7267130e</id>
<content type='text'>
commit 172bf5a9ef70a399bb227809db78442dc01d9e48 upstream.

There is a possibility that init_codecs is invoked multiple times during
manipulated payload from video firmware. In such case, if codecs_count
can get incremented to value more than MAX_CODEC_NUM, there can be OOB
access. Reset the count so that it always starts from beginning.

Cc: stable@vger.kernel.org
Fixes: 1a73374a04e5 ("media: venus: hfi_parser: add common capability parser")
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Vikash Garodia &lt;quic_vgarodia@quicinc.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: hfi: add check to handle incorrect queue size</title>
<updated>2025-05-02T05:39:13Z</updated>
<author>
<name>Vikash Garodia</name>
</author>
<published>2025-02-20T17:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b86c1917e16bafbbb08ab90baaff533aa36c62d'/>
<id>urn:sha1:1b86c1917e16bafbbb08ab90baaff533aa36c62d</id>
<content type='text'>
commit 69baf245b23e20efda0079238b27fc63ecf13de1 upstream.

qsize represents size of shared queued between driver and video
firmware. Firmware can modify this value to an invalid large value. In
such situation, empty_space will be bigger than the space actually
available. Since new_wr_idx is not checked, so the following code will
result in an OOB write.
...
qsize = qhdr-&gt;q_size

if (wr_idx &gt;= rd_idx)
 empty_space = qsize - (wr_idx - rd_idx)
....
if (new_wr_idx &lt; qsize) {
 memcpy(wr_ptr, packet, dwords &lt;&lt; 2) --&gt; OOB write

Add check to ensure qsize is within the allocated size while
reading and writing packets into the queue.

Cc: stable@vger.kernel.org
Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Vikash Garodia &lt;quic_vgarodia@quicinc.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: hfi: add a check to handle OOB in sfr region</title>
<updated>2025-05-02T05:39:13Z</updated>
<author>
<name>Vikash Garodia</name>
</author>
<published>2025-02-20T17:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4dd109038d513b92d4d33524ffc89ba32e02ba48'/>
<id>urn:sha1:4dd109038d513b92d4d33524ffc89ba32e02ba48</id>
<content type='text'>
commit f4b211714bcc70effa60c34d9fa613d182e3ef1e upstream.

sfr-&gt;buf_size is in shared memory and can be modified by malicious user.
OOB write is possible when the size is made higher than actual sfr data
buffer. Cap the size to allocated size for such cases.

Cc: stable@vger.kernel.org
Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Vikash Garodia &lt;quic_vgarodia@quicinc.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled</title>
<updated>2024-12-14T18:44:42Z</updated>
<author>
<name>Jinjie Ruan</name>
</author>
<published>2024-11-01T09:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=214db0ab96892314e6329f8306a7890f1e05a7fa'/>
<id>urn:sha1:214db0ab96892314e6329f8306a7890f1e05a7fa</id>
<content type='text'>
commit 2a20869f7d798aa2b69e45b863eaf1b1ecf98278 upstream.

It is not valid to call pm_runtime_set_suspended() for devices
with runtime PM enabled because it returns -EAGAIN if it is enabled
already and working. So, call pm_runtime_disable() before to fix it.

Cc: stable@vger.kernel.org
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Acked-by: Stanimir Varbanov &lt;stanimir.k.varbanov@gmail.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>media: venus: fix use after free bug in venus_remove due to race condition</title>
<updated>2024-11-08T15:20:41Z</updated>
<author>
<name>Zheng Wang</name>
</author>
<published>2024-06-18T09:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63bbe26471ebdcc3c20bb4cc3950d666279ad658'/>
<id>urn:sha1:63bbe26471ebdcc3c20bb4cc3950d666279ad658</id>
<content type='text'>
commit c5a85ed88e043474161bbfe54002c89c1cb50ee2 upstream.

in venus_probe, core-&gt;work is bound with venus_sys_error_handler, which is
used to handle error. The code use core-&gt;sys_err_done to make sync work.
The core-&gt;work is started in venus_event_notify.

If we call venus_remove, there might be an unfished work. The possible
sequence is as follows:

CPU0                  CPU1

                     |venus_sys_error_handler
venus_remove         |
hfi_destroy	 		 |
venus_hfi_destroy	 |
kfree(hdev);	     |
                     |hfi_reinit
					 |venus_hfi_queues_reinit
                     |//use hdev

Fix it by canceling the work in venus_remove.

Cc: stable@vger.kernel.org
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Zheng Wang &lt;zyytlz.wz@163.com&gt;
Signed-off-by: Dikshita Agarwal &lt;quic_dikshita@quicinc.com&gt;
Signed-off-by: Stanimir Varbanov &lt;stanimir.k.varbanov@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
