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 59E022DE714 for ; Tue, 16 Sep 2025 08:13:31 +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=1758010411; cv=none; b=CQ2WRUrlVDWfGu3kTtFAe2WUCBr4182pyUauLxcSBhE+Y8KdIkOCfDKOSn9w4wagpaLfTgmBI4yLI/pqoYCDvhie0nwHck04Xn8nnlPcFdpWbexjxtd9FdymrG+xibeht7u7r60TT3763JykAVdYIa5o0rUQMuVBv+lbSzgXIJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758010411; c=relaxed/simple; bh=NV+LgHi0we0xr48aPVnwXp89PP+beF2QK9ACvt0EotY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=f0x8HI/kYvAuBqYv9cHZ55bviMeZ47cJqYov3KB62a/TgYwiDkF3xOJ7aN3HU/9lXaDBnGAjUi611MypF31EaesSlFd0NV+SYYtBJgIAmO2vLaMC5rsoZGVFBvHiO5ICISZkXshnG80BytRwQsElxrJb9icOX8QAPyIYiFdp+ew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e9HxAgsB; 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="e9HxAgsB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB140C4CEEB; Tue, 16 Sep 2025 08:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758010411; bh=NV+LgHi0we0xr48aPVnwXp89PP+beF2QK9ACvt0EotY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=e9HxAgsBY9e8bDOdp5am1VRB+1+Pu12nTcwlNFAir/I9I+6+4thgsJZ3fvStsdPll jPkWu1s9hKko2oXPIOLz9MlczQXg/U92h6ApX+lWFl7/+7avserC2FelrMmqK7wwBA zWjylRbQr+3fcVSsroZS2F+yTnUUDA2lQqEcOQNk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53303: net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule() Date: Tue, 16 Sep 2025 10:11:53 +0200 Message-ID: <2025091628-CVE-2023-53303-c5cc@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=2933; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oqSdDwduvRvZgMNDFgPrZkKKSfJK45Di/1fy0lx19Ek=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknpTcyJlXvtNolHSK1LXJZ0/tbrydfEXr1Vl4jaeYOt 5f1k6tYOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi0TYMC5Yxl//PTnmwQMuz ecPPczenv+hLOswwV3rtxe8iE+I+h26W/vPv2Nc3N+37cgE= 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: net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule() Inject fault When select CONFIG_VCAP_KUNIT_TEST, the below memory leak occurs. If kzalloc() for duprule succeeds, but the following kmemdup() fails, the duprule, ckf and caf memory will be leaked. So kfree them in the error path. unreferenced object 0xffff122744c50600 (size 192): comm "kunit_try_catch", pid 346, jiffies 4294896122 (age 911.812s) hex dump (first 32 bytes): 10 27 00 00 04 00 00 00 1e 00 00 00 2c 01 00 00 .'..........,... 00 00 00 00 00 00 00 00 18 06 c5 44 27 12 ff ff ...........D'... backtrace: [<00000000394b0db8>] __kmem_cache_alloc_node+0x274/0x2f8 [<0000000001bedc67>] kmalloc_trace+0x38/0x88 [<00000000b0612f98>] vcap_dup_rule+0x50/0x460 [<000000005d2d3aca>] vcap_add_rule+0x8cc/0x1038 [<00000000eef9d0f8>] test_vcap_xn_rule_creator.constprop.0.isra.0+0x238/0x494 [<00000000cbda607b>] vcap_api_rule_remove_in_front_test+0x1ac/0x698 [<00000000c8766299>] kunit_try_run_case+0xe0/0x20c [<00000000c4fe9186>] kunit_generic_run_threadfn_adapter+0x50/0x94 [<00000000f6864acf>] kthread+0x2e8/0x374 [<0000000022e639b3>] ret_from_fork+0x10/0x20 The Linux kernel CVE team has assigned CVE-2023-53303 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit 814e7693207f1bd936d600f9b5467f133e3d6e40 and fixed in 6.5.4 with commit a26ba60413b2c8f95daf0ee0152cf82abd7bfbe4 Issue introduced in 6.3 with commit 814e7693207f1bd936d600f9b5467f133e3d6e40 and fixed in 6.6 with commit 281f65d29d6da1a9b6907fb0b145aaf34f4e4822 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-53303 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/net/ethernet/microchip/vcap/vcap_api.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/a26ba60413b2c8f95daf0ee0152cf82abd7bfbe4 https://git.kernel.org/stable/c/281f65d29d6da1a9b6907fb0b145aaf34f4e4822