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 4F2F9314A62 for ; Thu, 18 Sep 2025 16:05:54 +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=1758211555; cv=none; b=Aa+WYXBCYOw45k0y0eieeRouWDLQdmFynE5mT4d+b7SkkL3a+X4gLL19M5Ktsf252gp34tfdFeQ3/vUMpviR4vufbtG581LkiANvxkGOUTYezM9GtrwzSXfkPcAvRmT9btaZyzSeDZM0D4EhNAUnzwHWMc6dtSGMDW3bbZQ6f58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758211555; c=relaxed/simple; bh=adqa/4JYrCcr3Y/R6AkI8NY0pKx5mcXL3kTuyUzwcDc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KxHMdUUANzAOOvrU251K94bL4rAOvJn30H29RNqbRZVL80xGpgYZomYK+loIL1NQQM/DIUO2H9T95KDzjyJvWrSk7ToZegQzSEqS++2PRlaiBcbK1aJYh07b5cOADUNcNgRvUD9ZsDOxxol85728p4HhHU46MnqfYZb8HybuSAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ljGILVWs; 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="ljGILVWs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66022C4CEE7; Thu, 18 Sep 2025 16:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758211554; bh=adqa/4JYrCcr3Y/R6AkI8NY0pKx5mcXL3kTuyUzwcDc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ljGILVWskjUw1Brlq83gRRQmvAEtpd4RHEVESYRDNOVeoEsEeOFJZ39QTEsyvcTmW WJP4Xw9gm7nDeFDN33q7nk0QGcvhYxeCM/0K3VxbOn+PGj/2uOWVPbfqnRZzeNiraK iycQYkO6IaUdSfxd7xKfCt8h/fHvC23QBCY+/z98= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53441: bpf: cpumap: Fix memory leak in cpu_map_update_elem Date: Thu, 18 Sep 2025 18:04:32 +0200 Message-ID: <2025091859-CVE-2023-53441-0641@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=4938; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=endG8vyAsq9T8dXwcPVUxuSNgOGUgKpXvIDGkR7wA7w=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlndPP/ut9ddK613eM1U8B0kfhJIaomYc2Ndybd8Ck++ y1fP29pRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkqpthvl+R29TfTZpRHa/k Ds+dsM0tNIo5iGGeMlu+2O0L0af4mRnvHBXVOHF9n89HAA== 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: bpf: cpumap: Fix memory leak in cpu_map_update_elem Syzkaller reported a memory leak as follows: BUG: memory leak unreferenced object 0xff110001198ef748 (size 192): comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s) hex dump (first 32 bytes): 00 00 00 00 4a 19 00 00 80 ad e3 e4 fe ff c0 00 ....J........... 00 b2 d3 0c 01 00 11 ff 28 f5 8e 19 01 00 11 ff ........(....... backtrace: [] __cpu_map_entry_alloc+0xf7/0xb00 [] cpu_map_update_elem+0x2fe/0x3d0 [] bpf_map_update_value.isra.0+0x2bd/0x520 [] map_update_elem+0x4cb/0x720 [] __se_sys_bpf+0x8c3/0xb90 [] do_syscall_64+0x30/0x40 [] entry_SYSCALL_64_after_hwframe+0x61/0xc6 BUG: memory leak unreferenced object 0xff110001198ef528 (size 192): comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __cpu_map_entry_alloc+0x260/0xb00 [] cpu_map_update_elem+0x2fe/0x3d0 [] bpf_map_update_value.isra.0+0x2bd/0x520 [] map_update_elem+0x4cb/0x720 [] __se_sys_bpf+0x8c3/0xb90 [] do_syscall_64+0x30/0x40 [] entry_SYSCALL_64_after_hwframe+0x61/0xc6 BUG: memory leak unreferenced object 0xff1100010fd93d68 (size 8): comm "syz-executor.3", pid 17672, jiffies 4298118891 (age 9.906s) hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace: [] kvmalloc_node+0x11e/0x170 [] __cpu_map_entry_alloc+0x2f0/0xb00 [] cpu_map_update_elem+0x2fe/0x3d0 [] bpf_map_update_value.isra.0+0x2bd/0x520 [] map_update_elem+0x4cb/0x720 [] __se_sys_bpf+0x8c3/0xb90 [] do_syscall_64+0x30/0x40 [] entry_SYSCALL_64_after_hwframe+0x61/0xc6 In the cpu_map_update_elem flow, when kthread_stop is called before calling the threadfn of rcpu->kthread, since the KTHREAD_SHOULD_STOP bit of kthread has been set by kthread_stop, the threadfn of rcpu->kthread will never be executed, and rcpu->refcnt will never be 0, which will lead to the allocated rcpu, rcpu->queue and rcpu->queue->queue cannot be released. Calling kthread_stop before executing kthread's threadfn will return -EINTR. We can complete the release of memory resources in this state. The Linux kernel CVE team has assigned CVE-2023-53441 to this issue. Affected and fixed versions =========================== Issue introduced in 4.15 with commit 6710e1126934d8b4372b4d2f9ae1646cd3f151bf and fixed in 5.15.121 with commit d26299f50f5ea8f0aeb5d49e659c31f64233c816 Issue introduced in 4.15 with commit 6710e1126934d8b4372b4d2f9ae1646cd3f151bf and fixed in 6.1.40 with commit b11a9b4f28cb6ff69ef7e69809e5f7fffeac9030 Issue introduced in 4.15 with commit 6710e1126934d8b4372b4d2f9ae1646cd3f151bf and fixed in 6.4.5 with commit a957ac8e0b5ffb5797382a6adbafd005a5f72851 Issue introduced in 4.15 with commit 6710e1126934d8b4372b4d2f9ae1646cd3f151bf and fixed in 6.5 with commit 4369016497319a9635702da010d02af1ebb1849d 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-53441 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: kernel/bpf/cpumap.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/d26299f50f5ea8f0aeb5d49e659c31f64233c816 https://git.kernel.org/stable/c/b11a9b4f28cb6ff69ef7e69809e5f7fffeac9030 https://git.kernel.org/stable/c/a957ac8e0b5ffb5797382a6adbafd005a5f72851 https://git.kernel.org/stable/c/4369016497319a9635702da010d02af1ebb1849d