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 99F4E3B8959 for ; Wed, 25 Mar 2026 10:33:50 +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=1774434830; cv=none; b=qRPnvlJtkBUWbpfaBLGjEGt4W60wHfp5T1w6qeunLPzsHfAOxc8cv4S0b+u6HqVKtEoyOCqG94uu+I5wgycc3GSAXY6iI2bqi9i0fETWAnTE+b0It0kNQIHqYTLNq69gdfaaXdVb+mAPoH4zcEYzPJH5DOe6Z12ERHHn7fT01dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774434830; c=relaxed/simple; bh=OcNt/tu3NUqEKcXVX7AktdGq2ZHt6uD19lNGtLc5Vzw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NsMY2bzfWsr6OvdPN88TKAs4AVoCdYjS92oJCrbNUqwFyebFVKOpclCC2F8/whXsjZ0GmmJol+gzf1zVNNO7x/NM/Lowwi4QzVsJ+KAkYB9wwjWytCnRTSBxIxzMjgiR3j866N2YC/GlF4ApayNI+mRq/Tyoa5rXbLWwHlC2s4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=as/0VNf1; 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="as/0VNf1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC111C4CEF7; Wed, 25 Mar 2026 10:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774434830; bh=OcNt/tu3NUqEKcXVX7AktdGq2ZHt6uD19lNGtLc5Vzw=; h=From:To:Cc:Subject:Date:Reply-To:From; b=as/0VNf1TMu8EhSCjiZwRO4frtGDAelv72u/AxAER6qLa6XeuQy/Eg+F746P0ixSk tW8MZ0Fmq7jGvMCrmwzyC32eyuMezqvfwJ1cGqehl1H0jAK2yZh5gM4QQQhKFEKnC/ dFq3Fc6ukrSy29xutAyRHgm7xomLVUdgNYD14HTg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman , Sean Anderson Subject: CVE-2026-23390: tracing/dma: Cap dma_map_sg tracepoint arrays to prevent buffer overflow Date: Wed, 25 Mar 2026 11:28:38 +0100 Message-ID: <2026032537-CVE-2026-23390-7146@gregkh> X-Mailer: git-send-email 2.53.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=3016; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EfD2NtIOIm6Vps0GPvJDlxDgBwygCxKVg1s7hlbk9Ro=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmHd1xlXd6mHd767daExqLIDn15lamWKikvth/bsm2Hh rjVyoZjHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRi+8ZFmxv/KikyVDvIZ6d XDt1+7SKEH7hMwzzLD8v+lg85Z/nf+u/YtPL2U0MPk/9CQA= 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: tracing/dma: Cap dma_map_sg tracepoint arrays to prevent buffer overflow The dma_map_sg tracepoint can trigger a perf buffer overflow when tracing large scatter-gather lists. With devices like virtio-gpu creating large DRM buffers, nents can exceed 1000 entries, resulting in: phys_addrs: 1000 * 8 bytes = 8,000 bytes dma_addrs: 1000 * 8 bytes = 8,000 bytes lengths: 1000 * 4 bytes = 4,000 bytes Total: ~20,000 bytes This exceeds PERF_MAX_TRACE_SIZE (8192 bytes), causing: WARNING: CPU: 0 PID: 5497 at kernel/trace/trace_event_perf.c:405 perf buffer not large enough, wanted 24620, have 8192 Cap all three dynamic arrays at 128 entries using min() in the array size calculation. This ensures arrays are only as large as needed (up to the cap), avoiding unnecessary memory allocation for small operations while preventing overflow for large ones. The tracepoint now records the full nents/ents counts and a truncated flag so users can see when data has been capped. Changes in v2: - Use min(nents, DMA_TRACE_MAX_ENTRIES) for dynamic array sizing instead of fixed DMA_TRACE_MAX_ENTRIES allocation (feedback from Steven Rostedt) - This allocates only what's needed up to the cap, avoiding waste for small operations Reviwed-by: Sean Anderson The Linux kernel CVE team has assigned CVE-2026-23390 to this issue. Affected and fixed versions =========================== Fixed in 6.12.74 with commit 02d209bb018a40dee9eac89e91860253dee9605b Fixed in 6.18.13 with commit f2584f791a10343bdc995ff6ff402db45b95de69 Fixed in 6.19 with commit daafcc0ef0b358d9d622b6e3b7c43767aa3814ee 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-2026-23390 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: include/trace/events/dma.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/02d209bb018a40dee9eac89e91860253dee9605b https://git.kernel.org/stable/c/f2584f791a10343bdc995ff6ff402db45b95de69 https://git.kernel.org/stable/c/daafcc0ef0b358d9d622b6e3b7c43767aa3814ee