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 243EB39301D for ; Tue, 16 Dec 2025 13:30: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=1765891851; cv=none; b=JaH+B/hVRDLKsiBpO9PPhp5x4Yiu12cSeQgyD8lJVuign3aW9IRUaSyuzZF+IkSPJtPaqOOQB4trU11/+w/zoZzF/4NwxvTOK17mzhOu2NX2tKFPJHC818ZIk26gTP4+O41m99ZSZ+5YjePZjjihxDSStItfLG7hCFTgxcvm70w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765891851; c=relaxed/simple; bh=D0ArEShScccda/HYPmAMTzQ7AvJmM0DVJNwpgqN8pL4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ipQPZ2N7uVuc2d6Sy15iD1wtpKZ0+VvVQFepi0Qc0fBYw66qycgVKq1XFxEvIigB+BJSXQ0/IoO9GU4Cun8CwujcWwIOfffiJF879guzouvf9de+z264ZoOATxk6wsHRByCnU+QXepJ1R5/jSbpW/2S1GaYwm19wexwD+hDS9YI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mtfQVOuv; 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="mtfQVOuv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B41DC4CEF1; Tue, 16 Dec 2025 13:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765891850; bh=D0ArEShScccda/HYPmAMTzQ7AvJmM0DVJNwpgqN8pL4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=mtfQVOuvjehXNjCl7ZBNrbKkRi+wQ2f32qqM+Vanyjm2zzcLhkb29eZtFPm8ArOJr JrwTdBrOkQXQbIRqBYrvA/8P0VMm7y/0mY25Fph62wHwFvr9UOsKfoAy9h5IfUYkk0 PeYbjpfqGeE3PebjLP2nT1wnKguAgiwmTHPaho1w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40356: spi: rockchip-sfc: Fix DMA-API usage Date: Tue, 16 Dec 2025 14:30:43 +0100 Message-ID: <2025121637-CVE-2025-40356-27b8@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=2882; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vf2d6GUHvJLniqIetmBxjQEaFZVhI6kI8kZ+uCJq114=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOcf9KIvflv54zc8mhq0yu59P+rZe7LLJru97Mn78aw rg9VpVod8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE2F0Z5kfelWCP+vxi216D v4bx/7i7Us86yDAsmCn14JhNfg3r+1ld0jlpouyhC05WAgA= 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: spi: rockchip-sfc: Fix DMA-API usage Use DMA-API dma_map_single() call for getting the DMA address of the transfer buffer instead of hacking with virt_to_phys(). This fixes the following DMA-API debug warning: ------------[ cut here ]------------ DMA-API: rockchip-sfc fe300000.spi: device driver tries to sync DMA memory it has not allocated [device address=0x000000000cf70000] [size=288 bytes] WARNING: kernel/dma/debug.c:1106 at check_sync+0x1d8/0x690, CPU#2: systemd-udevd/151 Modules linked in: ... Hardware name: Hardkernel ODROID-M1 (DT) pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : check_sync+0x1d8/0x690 lr : check_sync+0x1d8/0x690 .. Call trace: check_sync+0x1d8/0x690 (P) debug_dma_sync_single_for_cpu+0x84/0x8c __dma_sync_single_for_cpu+0x88/0x234 rockchip_sfc_exec_mem_op+0x4a0/0x798 [spi_rockchip_sfc] spi_mem_exec_op+0x408/0x498 spi_nor_read_data+0x170/0x184 spi_nor_read_sfdp+0x74/0xe4 spi_nor_parse_sfdp+0x120/0x11f0 spi_nor_sfdp_init_params_deprecated+0x3c/0x8c spi_nor_scan+0x690/0xf88 spi_nor_probe+0xe4/0x304 spi_mem_probe+0x6c/0xa8 spi_probe+0x94/0xd4 really_probe+0xbc/0x298 ... The Linux kernel CVE team has assigned CVE-2025-40356 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit b69386fcbc6066fb4885667743ab4d4967d561b8 and fixed in 6.17.6 with commit 22810d4cb0e8a7d51b24527e73beac60afc1c693 Issue introduced in 6.14 with commit b69386fcbc6066fb4885667743ab4d4967d561b8 and fixed in 6.18 with commit ee795e82e10197c070efd380dc9615c73dffad6c 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-40356 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/spi/spi-rockchip-sfc.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/22810d4cb0e8a7d51b24527e73beac60afc1c693 https://git.kernel.org/stable/c/ee795e82e10197c070efd380dc9615c73dffad6c