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 0D1A628469F for ; Wed, 18 Jun 2025 09:34:36 +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=1750239279; cv=none; b=o2NWOADEXBqXInakQv2jtDK2DPBBXz7lglS+904Gu5+T3DkQnZVFkqkVtDowoM8fN1mqw7zVlEosv3XxQdG5iWS2d34uzE4ISQF3mSMKRrtxXNm2AYvHihYhoNAVFAa31YpFxvX92doHUipG1ORs2ohKjc58u2xxiBY/YPTH+/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750239279; c=relaxed/simple; bh=mAlL/jlHJLGwHUJx0a+7voH+5QmpfR2GUJknjOJvZT4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=knl75RC1lTx44vKw4YsEzZ+HZ08eQCrudo34OYNfpqRdcYjaEa+WkTtDMMiTnk17rqgYPh/XXn54gSYeI4n8zp6SNJUE0ezUZsyRPw6aJMO1hUiWgxOO52StTLhu0YFUE+9wUqLb6oU822xhYr/vx/+EKb3/vk5sUEoQehcFsfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MyEhfFY7; 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="MyEhfFY7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FC66C4CEE7; Wed, 18 Jun 2025 09:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750239276; bh=mAlL/jlHJLGwHUJx0a+7voH+5QmpfR2GUJknjOJvZT4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MyEhfFY7FtFCBX/f2fR2IuC8Duwqs8bLE/rPSMjcfoirnDMZPJ72LZu1S8tB9/OR9 swFk5gh7I0mJzQP3OgWblavpXm8/52Vv4ZTWqlGcKGqsWbXPzmGtA8sKwC1py0bkjF xzo8lAM9oVzK/yKoATI1GayoVn5GBZ4slhtVYZKk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38048: virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN Date: Wed, 18 Jun 2025 11:33:44 +0200 Message-ID: <2025061830-CVE-2025-38048-4dc4@gregkh> X-Mailer: git-send-email 2.49.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=3860; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YcBC4X5edL/ym/S1c6rDNt+W/v/VUM3MX9aGiGxY/lU=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlB7a9nPSu69amI+fo1Gea2/09PfDGaeXRCviLPl9PVl 7U6t6td74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ3NFgmGcgynbH4EBVqcZJ Dg2R/NKGDHWeYoYFjftmROrmFHhYsVi0Hoti+ZoYs28PAA== 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: virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN syzbot reports a data-race when accessing the event_triggered, here is the simplified stack when the issue occurred: ================================================================== BUG: KCSAN: data-race in virtqueue_disable_cb / virtqueue_enable_cb_delayed write to 0xffff8881025bc452 of 1 bytes by task 3288 on cpu 0: virtqueue_enable_cb_delayed+0x42/0x3c0 drivers/virtio/virtio_ring.c:2653 start_xmit+0x230/0x1310 drivers/net/virtio_net.c:3264 __netdev_start_xmit include/linux/netdevice.h:5151 [inline] netdev_start_xmit include/linux/netdevice.h:5160 [inline] xmit_one net/core/dev.c:3800 [inline] read to 0xffff8881025bc452 of 1 bytes by interrupt on cpu 1: virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:880 [inline] virtqueue_disable_cb+0x92/0x180 drivers/virtio/virtio_ring.c:2566 skb_xmit_done+0x5f/0x140 drivers/net/virtio_net.c:777 vring_interrupt+0x161/0x190 drivers/virtio/virtio_ring.c:2715 __handle_irq_event_percpu+0x95/0x490 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] value changed: 0x01 -> 0x00 ================================================================== When the data race occurs, the function virtqueue_enable_cb_delayed() sets event_triggered to false, and virtqueue_disable_cb_split/packed() reads it as false due to the race condition. Since event_triggered is an unreliable hint used for optimization, this should only cause the driver temporarily suggest that the device not send an interrupt notification when the event index is used. Fix this KCSAN reported data-race issue by explicitly tagging the access as data_racy. The Linux kernel CVE team has assigned CVE-2025-38048 to this issue. Affected and fixed versions =========================== Fixed in 5.15.185 with commit 02d2d6caee3abc9335cfca35f8eb4492173ae6f2 Fixed in 6.1.141 with commit b6d6419548286b2b9d2b90df824d3cab797f6ae8 Fixed in 6.6.93 with commit b49b5132e4c7307599492aee1cdc6d89f7f2a7da Fixed in 6.12.31 with commit b730cb109633c455ce8a7cd6934986c6a16d88d8 Fixed in 6.14.9 with commit 4ed8f0e808b3fcc71c5b8be7902d8738ed595b17 Fixed in 6.15 with commit 2e2f925fe737576df2373931c95e1a2b66efdfef 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-2025-38048 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/virtio/virtio_ring.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/02d2d6caee3abc9335cfca35f8eb4492173ae6f2 https://git.kernel.org/stable/c/b6d6419548286b2b9d2b90df824d3cab797f6ae8 https://git.kernel.org/stable/c/b49b5132e4c7307599492aee1cdc6d89f7f2a7da https://git.kernel.org/stable/c/b730cb109633c455ce8a7cd6934986c6a16d88d8 https://git.kernel.org/stable/c/4ed8f0e808b3fcc71c5b8be7902d8738ed595b17 https://git.kernel.org/stable/c/2e2f925fe737576df2373931c95e1a2b66efdfef