CVE-2026-68228: media: chips-media: wave5: Move src_buf Removal to finish_encode

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081016-CVE-2026-68228-60f7@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

media: chips-media: wave5: Move src_buf Removal to finish_encode

During encoder processing, there is a case where the IRQ response could
return the buffer back to userspace via v4l2_m2m_buf_done call. In this
time, userspace could queue up this same buffer before start_encode removes
the index from the ready queue. This would then lead to a case where the
buffer in the ready queue could be a self loop due to the
WRITE_ONCE(prev->next, new) call in __list_add.

When __list_del is finally called, the loop is already made so nothing
points back to ready queue list head and pointers are poisoned.

A buffer should not be marked as DONE before the buffer is removed from
m2m ready queue. Move removal entirely to finish_encode.

The Linux kernel CVE team has assigned CVE-2026-68228 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.8 with commit 9707a6254a8a6b978bde811a44fe07d86c229d1c and fixed in 6.12.101 with commit 1ee2b2b189ddc7b23c8eee1145de42b8bd19fb06
	Issue introduced in 6.8 with commit 9707a6254a8a6b978bde811a44fe07d86c229d1c and fixed in 6.18.42 with commit f24ca8b53fe15db40957bdaa40c9aa68e1557bbe
	Issue introduced in 6.8 with commit 9707a6254a8a6b978bde811a44fe07d86c229d1c and fixed in 7.1.6 with commit d681227ce43bfd74b6eb69beecd9b0bec1fd8b48
	Issue introduced in 6.8 with commit 9707a6254a8a6b978bde811a44fe07d86c229d1c and fixed in 7.2-rc1 with commit b20157147089a9c16a38c7810e2fe6f2df8e3277

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-68228
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/1ee2b2b189ddc7b23c8eee1145de42b8bd19fb06
	https://git.kernel.org/stable/c/f24ca8b53fe15db40957bdaa40c9aa68e1557bbe
	https://git.kernel.org/stable/c/d681227ce43bfd74b6eb69beecd9b0bec1fd8b48
	https://git.kernel.org/stable/c/b20157147089a9c16a38c7810e2fe6f2df8e3277
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.