Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E95CA29DB64 for ; Tue, 16 Sep 2025 16:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758039189; cv=none; b=ckOwdzEK+yCcgYiAbRRjx7ugWoaX5FPcYa/2zgl6KcOHaxTY5Japcxu0g5WOnYklyAPCta6I0sRzKKxz8/ZUE3tZrdqILeHx+BhqZjLWI7JLZccgt2CZBy8SQ8vhBOn4usQc5XGoLDj2BqEfg0lESUJ9vWeBMDwatuYZrWaZaK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758039189; c=relaxed/simple; bh=Mrnnjlpl23mQzRa687RYJtV4sAOWfo4oP9IzSgN2l/8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=frbfNHApLJUvyhsnb2ZYBuNv9TTbDtTsbBxt+iOXVGeIiz+M2TPM5GX+zqTFvq71CpEmODqyN1KLbd1xQ/hsAgDb5xpgpgalNliOlPUpjRmE4QiV0t+vsP2uzmVswPBi4LSqnD1LLGi52R6tNmWxYjRjduK1fZrEvR/C3uMul54= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QqGwxa+g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QqGwxa+g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D0D8C4CEF0; Tue, 16 Sep 2025 16:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758039188; bh=Mrnnjlpl23mQzRa687RYJtV4sAOWfo4oP9IzSgN2l/8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QqGwxa+gBMkPACJ61jsM85Uo6FIjIcPBmJ22u/mJx1rYfkWdhrMn7OKa8f9pS4Wg5 G6QX1ixKoJayU+MaqB5zmRKqnZlag7IP3CGVa7lbcr3XNKiTPoLTIrITMbGco+MUua qyfTBAisthfMaLOt5CMvAL7gVGzxOSj9xd0SUqb4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50340: media: vimc: Fix wrong function called when vimc_init() fails Date: Tue, 16 Sep 2025 18:11:36 +0200 Message-ID: <2025091638-CVE-2022-50340-693e@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2982; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vYcg8jREmtK0xRYlyq65RYafIixQkpEMXUgeZeSdGXQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkne6xWbDKesv3Q8p7Ag1dPrBIL3hLyIvXfm/wMkbjs7 AdBOxhXdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBETvYxzA9siv8jHz31e9PF Qw8Culoqnm0ufsswv2Cykunluu5tH0TfGE/YcTUqra3GBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: media: vimc: Fix wrong function called when vimc_init() fails In vimc_init(), when platform_driver_register(&vimc_pdrv) fails, platform_driver_unregister(&vimc_pdrv) is wrongly called rather than platform_device_unregister(&vimc_pdev), which causes kernel warning: Unexpected driver unregister! WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driver_unregister+0x8f/0xb0 RIP: 0010:driver_unregister+0x8f/0xb0 Call Trace: vimc_init+0x7d/0x1000 [vimc] do_one_initcall+0xd0/0x4e0 do_init_module+0x1cf/0x6b0 load_module+0x65c2/0x7820 The Linux kernel CVE team has assigned CVE-2022-50340 to this issue. Affected and fixed versions =========================== Issue introduced in 4.13 with commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f and fixed in 5.10.163 with commit 14d85b600bb1f6f8ef61fa8fc1907e2e623d8350 Issue introduced in 4.13 with commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f and fixed in 5.15.86 with commit 9c9ff35d68691aaea85b2e93763772e23930b3a3 Issue introduced in 4.13 with commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f and fixed in 6.0.16 with commit 681ac2902039d9b497b3ae18fdc204314979e61e Issue introduced in 4.13 with commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f and fixed in 6.1.2 with commit f38df8984ef1b45ba23888d0e232cc21a95bd04b Issue introduced in 4.13 with commit 4a29b70907496aa9da79112ec31cf9cf2b972c3f and fixed in 6.2 with commit f74d3f326d1d5b8951ce263c59a121ecfa65e7c0 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-2022-50340 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/test-drivers/vimc/vimc-core.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/14d85b600bb1f6f8ef61fa8fc1907e2e623d8350 https://git.kernel.org/stable/c/9c9ff35d68691aaea85b2e93763772e23930b3a3 https://git.kernel.org/stable/c/681ac2902039d9b497b3ae18fdc204314979e61e https://git.kernel.org/stable/c/f38df8984ef1b45ba23888d0e232cc21a95bd04b https://git.kernel.org/stable/c/f74d3f326d1d5b8951ce263c59a121ecfa65e7c0