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 14C74303A2E for ; Wed, 12 Nov 2025 10:24:34 +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=1762943075; cv=none; b=KlAjwLFjlMD3SxmrRU5xaOrdnfFa2h4PmAXv5H5dnQp7kBa+fEF8jDD8It/ftbCFDhbNmgsBq0liAVaIuVvGNpd0/rMGX/7j/+pvGRKr2EaMhHtfRGz2Luw2zkT3fXAOqOMXx4MkjRDoot0ur+2fv7nRkr1PoZI5T7yIGkDkEyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943075; c=relaxed/simple; bh=n+vzz5ujwRt/Zf9WzYP1QUW1mZ+GFUbJPTTKe8Ix4bg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HjHud7QMSg+8A26lxFKxt/EhltmmgeGiUVClcE1ag8F9+sI9UPZJEmYLfa+M/7ZHXHJiWPeVBDWlMXH1Dgecod4f31sTfx3+rAwApMQUVgI9lsh+E1cm9yPmQ5AR1ze1ACsQZWIDS7eLsZy2gdLOuyzRqKqRjRLoQDhClIhpO4g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bob4/rmT; 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="bob4/rmT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 728BBC4CEF5; Wed, 12 Nov 2025 10:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762943074; bh=n+vzz5ujwRt/Zf9WzYP1QUW1mZ+GFUbJPTTKe8Ix4bg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bob4/rmTq/aH71H2fZRkEcei0ZxDIhBN63UB9h9zuuvfhSRkun2GtlZPJ1da5xmUo qQQDztEJTY0cJsCT456Zpl5YT+yVK5ItR+re0DJjbK5m+uID+rxKB/UAgWTNLbF87A jlHqWM0CNYjtXN10f/E4dqcXy1bdcZQA07UnSj6Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40144: nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe() Date: Wed, 12 Nov 2025 19:24:20 +0900 Message-ID: <2025111256-CVE-2025-40144-f4bd@gregkh> X-Mailer: git-send-email 2.51.2 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=3157; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Cx42lbk6yTfgIRmIRqe4icUyMhhIwG0R2FtVmNZlFaM=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkiCTaSQiLK/2YfXWw6sWbqvFOVPF33A9jSzSby1PucL JhzhT2oI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYS95FhQdOd4CiXpZ6nRPP+ zpux4fX2iw7VmQwL5rcK6xutU+v4mvlpr3O/xYUA2aKrAA== 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: nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe() devm_kcalloc() may fail. ndtest_probe() allocates three DMA address arrays (dcr_dma, label_dma, dimm_dma) and later unconditionally uses them in ndtest_nvdimm_init(), which can lead to a NULL pointer dereference under low-memory conditions. Check all three allocations and return -ENOMEM if any allocation fails, jumping to the common error path. Do not emit an extra error message since the allocator already warns on allocation failure. The Linux kernel CVE team has assigned CVE-2025-40144 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 5.15.195 with commit 972cbba5cd384bacdc2eb589776e1d0a9f42714f Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 6.1.156 with commit bc8b56317ff83ef4bba89bda356b93978604694f Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 6.6.112 with commit b808a3590c2884ca91316dbadbfcc1924f5893c7 Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 6.12.53 with commit e4a1e3e88160f7d7a2c33e3db8844073ed6eaf97 Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 6.17.3 with commit 8aea9d512c65eed0dad98b8d65ce74fe77c01b34 Issue introduced in 5.11 with commit 9399ab61ad82154911563dd8635c585e3f24b16a and fixed in 6.18-rc1 with commit a9e6aa994917ee602798bbb03180a194b37865bb 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-40144 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: tools/testing/nvdimm/test/ndtest.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/972cbba5cd384bacdc2eb589776e1d0a9f42714f https://git.kernel.org/stable/c/bc8b56317ff83ef4bba89bda356b93978604694f https://git.kernel.org/stable/c/b808a3590c2884ca91316dbadbfcc1924f5893c7 https://git.kernel.org/stable/c/e4a1e3e88160f7d7a2c33e3db8844073ed6eaf97 https://git.kernel.org/stable/c/8aea9d512c65eed0dad98b8d65ce74fe77c01b34 https://git.kernel.org/stable/c/a9e6aa994917ee602798bbb03180a194b37865bb