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 CDC2C289E13 for ; Tue, 30 Dec 2025 12:23:58 +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=1767097438; cv=none; b=nDzQRVEk9MvyIFZLqAwyzz2zeeSvhK3YhmHvO110h6MmHwC/BflK+2JO8cvXvYhrdhfj+qUOYAv9otKc17+vX1vP6WhMRaS8pjYCy2bk5g6q36mf535nEZGDSMZYhj3uVWd/TL8+RRojmYqFauNV1hRjdZ4pW2aGWIaoPijcwL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097438; c=relaxed/simple; bh=Uv9OGIuy6XlQL7p2ZWtD8AKWSIn+XeQex22Dv8tY8Js=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=enidZsTpuBDHiyERNtirKYoE1/cpMTxqG8R6eHamXN81G1ff86Zbcp/+6yKOT0gtgC/fVuVue/ExyZinno1VcfdrtnRv/pdl8Uc7t0N39i2Fj480696iVvlIs1daX2XQR/MO7WE3UUNolh6PColLfWLI5N9fGC0gIt9uJGZEIXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pmEBkUAA; 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="pmEBkUAA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AA5DC4CEFB; Tue, 30 Dec 2025 12:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767097438; bh=Uv9OGIuy6XlQL7p2ZWtD8AKWSIn+XeQex22Dv8tY8Js=; h=From:To:Cc:Subject:Date:Reply-To:From; b=pmEBkUAAIzF4TpFAR7BzCm9DL7pzbeT18PGSjWCsf9xMm2y6EphliCNDwunDlwbTo UKTzenWawI0SMnDrN+x76BjOHzPn9IB4ET94rfwXu8K6YpL7d6P0oNAzPv1JA7sEsP AxqKOdmu0znYcqA6NQeP6iLPu8VCOETTRzSX5y+g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54283: bpf: Address KCSAN report on bpf_lru_list Date: Tue, 30 Dec 2025 13:23:36 +0100 Message-ID: <2025123026-CVE-2023-54283-b319@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5241; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pXTUZgWiyYjnvq1R6taSz1mMAPGgonI5wPqwBdYIXb8=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBR+yXVn/7yKgmnRJlclY/iK15f+HZEx+4dzDPLbcye b3CbM3WjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIVj+GBQet7aP6Kh99iFqW bZR2Zc/NBZvruBnmh83o076dlzef++OZiHVrUi+9sLDKBQA= 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: Address KCSAN report on bpf_lru_list KCSAN reported a data-race when accessing node->ref. Although node->ref does not have to be accurate, take this chance to use a more common READ_ONCE() and WRITE_ONCE() pattern instead of data_race(). There is an existing bpf_lru_node_is_ref() and bpf_lru_node_set_ref(). This patch also adds bpf_lru_node_clear_ref() to do the WRITE_ONCE(node->ref, 0) also. ================================================================== BUG: KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem write to 0xffff888137038deb of 1 bytes by task 11240 on cpu 1: __bpf_lru_node_move kernel/bpf/bpf_lru_list.c:113 [inline] __bpf_lru_list_rotate_active kernel/bpf/bpf_lru_list.c:149 [inline] __bpf_lru_list_rotate+0x1bf/0x750 kernel/bpf/bpf_lru_list.c:240 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:329 [inline] bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline] bpf_lru_pop_free+0x638/0xe20 kernel/bpf/bpf_lru_list.c:499 prealloc_lru_pop kernel/bpf/hashtab.c:290 [inline] __htab_lru_percpu_map_update_elem+0xe7/0x820 kernel/bpf/hashtab.c:1316 bpf_percpu_hash_update+0x5e/0x90 kernel/bpf/hashtab.c:2313 bpf_map_update_value+0x2a9/0x370 kernel/bpf/syscall.c:200 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1687 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4534 __sys_bpf+0x338/0x810 __do_sys_bpf kernel/bpf/syscall.c:5096 [inline] __se_sys_bpf kernel/bpf/syscall.c:5094 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5094 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888137038deb of 1 bytes by task 11241 on cpu 0: bpf_lru_node_set_ref kernel/bpf/bpf_lru_list.h:70 [inline] __htab_lru_percpu_map_update_elem+0x2f1/0x820 kernel/bpf/hashtab.c:1332 bpf_percpu_hash_update+0x5e/0x90 kernel/bpf/hashtab.c:2313 bpf_map_update_value+0x2a9/0x370 kernel/bpf/syscall.c:200 generic_map_update_batch+0x3ae/0x4f0 kernel/bpf/syscall.c:1687 bpf_map_do_batch+0x2d9/0x3d0 kernel/bpf/syscall.c:4534 __sys_bpf+0x338/0x810 __do_sys_bpf kernel/bpf/syscall.c:5096 [inline] __se_sys_bpf kernel/bpf/syscall.c:5094 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5094 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x01 -> 0x00 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 11241 Comm: syz-executor.3 Not tainted 6.3.0-rc7-syzkaller-00136-g6a66fdd29ea1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 ================================================================== The Linux kernel CVE team has assigned CVE-2023-54283 to this issue. Affected and fixed versions =========================== Fixed in 4.14.322 with commit 6eaef1b1d8720053eb1b6e7a3ff8b2ff0716bb90 Fixed in 4.19.291 with commit a89d14410ea0352420f03cddc67e0002dcc8f9a5 Fixed in 5.4.251 with commit e09a285ea1e859d4cc6cb689d8d5d7c1f7c7c0d5 Fixed in 5.10.188 with commit b6d9a4062c944ad095b34dc112bf646a84156f60 Fixed in 5.15.150 with commit 819ca25444b377935faa2dbb0aa3547519b5c80f Fixed in 6.1.42 with commit c006fe361cfd947f51a56793deddf891e5cbfef8 Fixed in 6.4.7 with commit 6e5e83b56f50fbd1c8f7dca7df7d72c67be25571 Fixed in 6.5 with commit ee9fd0ac3017c4313be91a220a9ac4c99dde7ad4 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-54283 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/bpf_lru_list.c kernel/bpf/bpf_lru_list.h 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/6eaef1b1d8720053eb1b6e7a3ff8b2ff0716bb90 https://git.kernel.org/stable/c/a89d14410ea0352420f03cddc67e0002dcc8f9a5 https://git.kernel.org/stable/c/e09a285ea1e859d4cc6cb689d8d5d7c1f7c7c0d5 https://git.kernel.org/stable/c/b6d9a4062c944ad095b34dc112bf646a84156f60 https://git.kernel.org/stable/c/819ca25444b377935faa2dbb0aa3547519b5c80f https://git.kernel.org/stable/c/c006fe361cfd947f51a56793deddf891e5cbfef8 https://git.kernel.org/stable/c/6e5e83b56f50fbd1c8f7dca7df7d72c67be25571 https://git.kernel.org/stable/c/ee9fd0ac3017c4313be91a220a9ac4c99dde7ad4