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 440F83930F9 for ; Tue, 16 Dec 2025 13:30:57 +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=1765891857; cv=none; b=r5iTgc5tKVpJmwN+nzwiqKt94zbqfQTvl9+sQ/O+kkA0pvDpLS68cDnSfgV6e930sFfxjxwtzKp8uS3eThrfTEvmD9xGP45EnmbgYA9ceM5iAD/L7OSSls0CrjeSG3Gi/VXtnczAiYg2yZHmkwuwvqAZpzTSZ2tatEG9bPuZu4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765891857; c=relaxed/simple; bh=+57uX4a/OuvY0PD+oGQ10fo+fKpGGc68pZt/dcJu20k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=vF+ZbQuF0A/HriiIN+n9He9UeOdrkL/JMXJkzrSjJa6+DtfFNt1o9qCpHa3AoITR4vluMovUD5byoX2z+vwFDdpj10D+CHVo44lOT2Z0kU6B5MaqlJ7W0fmZUaVnoLZvAKAHDgxHD/7n9dWpSWpNEhrMer4OAe7oPIB/a3ZYdUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uTMAXTcG; 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="uTMAXTcG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B109CC4CEF1; Tue, 16 Dec 2025 13:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765891857; bh=+57uX4a/OuvY0PD+oGQ10fo+fKpGGc68pZt/dcJu20k=; h=From:To:Cc:Subject:Date:Reply-To:From; b=uTMAXTcGFzLCyUjqGNNtRxaVB8BYvSbsyh+44dMpFQJx0LQ0KPSm5uSPm2OmzD769 cg+WYNmtX/XiW7EXVsJtoZNMKE3F6jcQqhk34+b8q8Bo18AdxNLLSBss/jDCGkHe7y 6eGSTzAgzXb/buiepZkfJsH++Vy5LhNsqdzdQpgQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40348: slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts Date: Tue, 16 Dec 2025 14:30:35 +0100 Message-ID: <2025121635-CVE-2025-40348-4387@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=2328; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9oTBSRbYOWwkGKVF2k5N7tyCauzRe48i6Q13Fp32R4s=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOcb8FE1WttFxtNxeYGBdwNf9/3N3byPv8fpDp3q1TT RJuT57YEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNRvMAwvyb8g29NO398cY+y 9Q4DuyJH5+4YhgVbl1sstuRMOaSpG+Py9YnEHwndXzMB 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: slab: Avoid race on slab->obj_exts in alloc_slab_obj_exts If two competing threads enter alloc_slab_obj_exts() and one of them fails to allocate the object extension vector, it might override the valid slab->obj_exts allocated by the other thread with OBJEXTS_ALLOC_FAIL. This will cause the thread that lost this race and expects a valid pointer to dereference a NULL pointer later on. Update slab->obj_exts atomically using cmpxchg() to avoid slab->obj_exts overrides by racing threads. Thanks for Vlastimil and Suren's help with debugging. The Linux kernel CVE team has assigned CVE-2025-40348 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12.54 with commit 715b6a5b41dae39baeaa40d3386b548bb278b9c2 and fixed in 6.12.56 with commit c7af5300d78460fc5037ddc77113ba3dbfe77dc0 Issue introduced in 6.17.4 with commit 07e38a54cabd9b4de7ceb7f075f29ffa463e458a and fixed in 6.17.6 with commit 7c34feda6a9a203c9744281f1b6671b7dad2012d 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-40348 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: mm/slub.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/c7af5300d78460fc5037ddc77113ba3dbfe77dc0 https://git.kernel.org/stable/c/7c34feda6a9a203c9744281f1b6671b7dad2012d https://git.kernel.org/stable/c/6ed8bfd24ce1cb31742b09a3eb557cd008533eec