CVE-2026-68223: media: meson: vdec: Fix memory leak in error path of vdec_open

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026081015-CVE-2026-68223-388f@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

media: meson: vdec: Fix memory leak in error path of vdec_open

The vdec_open() function previously jumped directly to
err_m2m_release when vdec_init_ctrls() failed, skipping
release of the m2m context. This caused a resource leak.

Fix it by introducing a proper err_m2m_ctx_release label
that calls v4l2_m2m_ctx_release(sess->m2m_ctx) before
releasing the m2m device.

This was identified via kmemleak:
unreferenced object 0xffff0000205d6878 (size 8):
  comm "v4l_id", pid 5289, jiffies 4294938580
  hex dump (first 8 bytes):
    40 d2 49 18 00 00 ff ff                          @.I.....
  backtrace (crc d3204599):
    kmemleak_alloc+0xc8/0xf0
    __kvmalloc_node_noprof+0x60c/0x850
    v4l2_ctrl_handler_init_class+0x1b4/0x2e8 [videodev]
    vdec_open+0x1f4/0x788 [meson_vdec]
    v4l2_open+0x144/0x460 [videodev]
    chrdev_open+0x1ac/0x500
    do_dentry_open+0x3f0/0xfe8
    vfs_open+0x68/0x320
    do_open+0x2d8/0x9a8
    path_openat+0x1d0/0x4f0
    do_filp_open+0x190/0x380
    do_sys_openat2+0xf8/0x1b0
    __arm64_sys_openat+0x13c/0x1e8
    invoke_syscall+0xdc/0x268
    el0_svc_common.constprop.0+0x178/0x258
    do_el0_svc+0x4c/0x70

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


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

	Issue introduced in 5.3 with commit 3e7f51bd96077acad6acd7b45668f65b44233c4e and fixed in 6.6.148 with commit c6cd08a71a630f19b10c318e76e3c56e1dd10e00
	Issue introduced in 5.3 with commit 3e7f51bd96077acad6acd7b45668f65b44233c4e and fixed in 6.12.101 with commit 2cf0171ad594860e31723c671e37824ce12c01ea
	Issue introduced in 5.3 with commit 3e7f51bd96077acad6acd7b45668f65b44233c4e and fixed in 6.18.42 with commit 1391b75bf0119b5d37f1c1c3078d452a01967f9b
	Issue introduced in 5.3 with commit 3e7f51bd96077acad6acd7b45668f65b44233c4e and fixed in 7.1.6 with commit 99f3527bd1a27ff798d59177ed045b0dd87deaef
	Issue introduced in 5.3 with commit 3e7f51bd96077acad6acd7b45668f65b44233c4e and fixed in 7.2-rc1 with commit 940f161f734b25f175a95d2684c2021f6323693a

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-68223
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/staging/media/meson/vdec/vdec.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/c6cd08a71a630f19b10c318e76e3c56e1dd10e00
	https://git.kernel.org/stable/c/2cf0171ad594860e31723c671e37824ce12c01ea
	https://git.kernel.org/stable/c/1391b75bf0119b5d37f1c1c3078d452a01967f9b
	https://git.kernel.org/stable/c/99f3527bd1a27ff798d59177ed045b0dd87deaef
	https://git.kernel.org/stable/c/940f161f734b25f175a95d2684c2021f6323693a
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.