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 7BDD21C36 for ; Wed, 16 Apr 2025 14:19:53 +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=1744813193; cv=none; b=CWiBhTUunSfQeutdBiHRyM2zhi9VEe99taPD48tPS6h3Vec7otuUkO9wSf76fWQJFvjyXyxHG9MDd8/rfeKSLfhhja2QhYd7OuAGxZ1dVryW6AFzM2s9Iohlet80bZPU0HY0H2xsPdGJSqFuL5ho+dEBz7SDbvbNgiqG99Ij91Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813193; c=relaxed/simple; bh=uRsBkKtLcWN55NZ6CoDkfLFWrK0Cn5v58CTU+4uOHE8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hT2nt4dCxP7rmd7tk7UbBJWLuk/siJ6gFrhV30CyV3chwDS+ofh7kPxAmPbUGhw0w0FTXIMuzmsUSdiKfjuYDahBOMeQsqx72dO7je2sdwuTxrSilE8TdKOiZfOwkhFTEYlZtbKsI73ebEGm7UlTxM3k8gLGuNgViu9xEJOeyN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OOm97+3L; 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="OOm97+3L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 062F2C4CEE2; Wed, 16 Apr 2025 14:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813193; bh=uRsBkKtLcWN55NZ6CoDkfLFWrK0Cn5v58CTU+4uOHE8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OOm97+3L6b3xPqnpQx7K1736mmu5+tslW28S5Asz1uV+CzTj+hhjrbACaW56LLUIp Sin5bYKkujX9Hgk1NEUhza0VF3/tVlI2SnCS6vZj2dQJAB1VzpZnNN+BGKwt2UBtmV 1GB++WUUTeNj4LJCnQ1sICwjJYIbm/BADd+x9cZY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-23131: dlm: prevent NPD when writing a positive value to event_done Date: Wed, 16 Apr 2025 16:13:42 +0200 Message-ID: <2025041631-CVE-2025-23131-1a88@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=2375; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uRsBkKtLcWN55NZ6CoDkfLFWrK0Cn5v58CTU+4uOHE8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d51fGutSld2yMepkfFaXkVHo2vioeYr9p2O+tR3ZP 7cn7RFfRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkvzjDgrVJgX/OsjwVPXRu 61rjHNGvu8o5vBjmKXVtDZ90Utbf9abcy84PkxhCT2yfDwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: dlm: prevent NPD when writing a positive value to event_done do_uevent returns the value written to event_done. In case it is a positive value, new_lockspace would undo all the work, and lockspace would not be set. __dlm_new_lockspace, however, would treat that positive value as a success due to commit 8511a2728ab8 ("dlm: fix use count with multiple joins"). Down the line, device_create_lockspace would pass that NULL lockspace to dlm_find_lockspace_local, leading to a NULL pointer dereference. Treating such positive values as successes prevents the problem. Given this has been broken for so long, this is unlikely to break userspace expectations. The Linux kernel CVE team has assigned CVE-2025-23131 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.31 with commit 8511a2728ab82cab398e39d019f5cf1246021c1c and fixed in 6.14.2 with commit b73c4ad4d387fe5bc988145bd9f1bc0de76afd5c Issue introduced in 2.6.31 with commit 8511a2728ab82cab398e39d019f5cf1246021c1c and fixed in 6.15-rc1 with commit 8e2bad543eca5c25cd02cbc63d72557934d45f13 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-23131 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: fs/dlm/lockspace.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/b73c4ad4d387fe5bc988145bd9f1bc0de76afd5c https://git.kernel.org/stable/c/8e2bad543eca5c25cd02cbc63d72557934d45f13