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 EBEBD335945 for ; Wed, 17 Sep 2025 14:58:18 +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=1758121099; cv=none; b=gxSRkWddLjLHRNEXBr2AcdMWECfMpPyFveuNXjZtH8MDSv8KZH4M4kp+py7rZkSMmyW4XaWr+FKcJoYtXKhS4GbhkKjU99KLT1hhp9accDsBgiglO6sWGo9T7HLAWpy0U96Bi4253hGheScg8EswX+NlP1h99ufjN4lT/lebq+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121099; c=relaxed/simple; bh=gfCroYvhVdB+lqqfD0zBn41TMNhhCjG6e5w2x1E5/MI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k1+vKJe1bWBGTYJf1kUB2GsJQSuhfZBKGs3s0d9ZZDxuT7uIUsnMb9bLvDaUBndX/OAsYaJ6BMYJzQ7+SuhIyVkzLwyEOZu/8yl+lKaryCeWyTK4unKfYJdIdcd4zBvx0nWUuUp6cidTxdYzXhhgGGWmx7pO9MMFVB2UMQDzRVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S89k1cqi; 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="S89k1cqi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B946C4CEE7; Wed, 17 Sep 2025 14:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121098; bh=gfCroYvhVdB+lqqfD0zBn41TMNhhCjG6e5w2x1E5/MI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=S89k1cqiWPXPcYzzYLgP8uf5W7DBqNzsktgFP0i0JprwGHqbn7EABKtk0hirdTy/I gVWd62CwMaAAIf+3t8OVtLNpO53mhGn3jDlTCy/yILADXyMTlDhr/m72kfKNm9VPF0 3qTJasnNXRTotExOFqwfwbsLP9WazTEReoDJLcuM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53349: media: ov2740: Fix memleak in ov2740_init_controls() Date: Wed, 17 Sep 2025 16:56:48 +0200 Message-ID: <2025091720-CVE-2023-53349-deef@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=3805; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QApNOOyeZXnLloqFxh0s9ornjesEt/R/Our0CoTJsJs=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzogcvXH/bdL87RPmeDiE3LxUNu3x43taR7VuXN2ue 8XxB9v8qo5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYyKM7DPNU2pg2O797r/+9 P3afQ47A5dbCR9MZFnQ9X1XcNv9G+IHsiVELvZRjGv8xaQIA 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: ov2740: Fix memleak in ov2740_init_controls() There is a kmemleak when testing the media/i2c/ov2740.c with bpf mock device: unreferenced object 0xffff8881090e19e0 (size 16): comm "51-i2c-ov2740", pid 278, jiffies 4294781584 (age 23.613s) hex dump (first 16 bytes): 00 f3 7c 0b 81 88 ff ff 80 75 6a 09 81 88 ff ff ..|......uj..... backtrace: [<000000004e9fad8f>] __kmalloc_node+0x44/0x1b0 [<0000000039c802f4>] kvmalloc_node+0x34/0x180 [<000000009b8b5c63>] v4l2_ctrl_handler_init_class+0x11d/0x180 [videodev] [<0000000038644056>] ov2740_probe+0x37d/0x84f [ov2740] [<0000000092489f59>] i2c_device_probe+0x28d/0x680 [<000000001038babe>] really_probe+0x17c/0x3f0 [<0000000098c7af1c>] __driver_probe_device+0xe3/0x170 [<00000000e1b3dc24>] device_driver_attach+0x34/0x80 [<000000005a04a34d>] bind_store+0x10b/0x1a0 [<00000000ce25d4f2>] drv_attr_store+0x49/0x70 [<000000007d9f4e9a>] sysfs_kf_write+0x8c/0xb0 [<00000000be6cff0f>] kernfs_fop_write_iter+0x216/0x2e0 [<0000000031ddb40a>] vfs_write+0x658/0x810 [<0000000041beecdd>] ksys_write+0xd6/0x1b0 [<0000000023755840>] do_syscall_64+0x38/0x90 [<00000000b2cc2da2>] entry_SYSCALL_64_after_hwframe+0x63/0xcd ov2740_init_controls() won't clean all the allocated resources in fail path, which may causes the memleaks. Add v4l2_ctrl_handler_free() to prevent memleak. The Linux kernel CVE team has assigned CVE-2023-53349 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 866edc895171f1256aad3e81dce193447955c202 and fixed in 5.10.173 with commit a163ee11345d8322321c28bd61631de32455b987 Issue introduced in 5.8 with commit 866edc895171f1256aad3e81dce193447955c202 and fixed in 5.15.99 with commit 3969b2ebc66039306f505c7c630c5530800f83c0 Issue introduced in 5.8 with commit 866edc895171f1256aad3e81dce193447955c202 and fixed in 6.1.16 with commit fc33380ae06f438b652f66b9370b543976ac8a03 Issue introduced in 5.8 with commit 866edc895171f1256aad3e81dce193447955c202 and fixed in 6.2.3 with commit 7c405ee63447f14eefcfe12a18aa749abbd596ea Issue introduced in 5.8 with commit 866edc895171f1256aad3e81dce193447955c202 and fixed in 6.3 with commit 2d899592ed7829d0d5140853bac4d58742a6b8af 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-2023-53349 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/i2c/ov2740.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/a163ee11345d8322321c28bd61631de32455b987 https://git.kernel.org/stable/c/3969b2ebc66039306f505c7c630c5530800f83c0 https://git.kernel.org/stable/c/fc33380ae06f438b652f66b9370b543976ac8a03 https://git.kernel.org/stable/c/7c405ee63447f14eefcfe12a18aa749abbd596ea https://git.kernel.org/stable/c/2d899592ed7829d0d5140853bac4d58742a6b8af