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 AAC4C18C33F for ; Fri, 27 Sep 2024 12:41:06 +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=1727440866; cv=none; b=ek5auYeBDg6v8v5BabIfxBSIAlyyEttiV5/8UY7nLxvNY6BmI08IzDuJvefogwvOVnxu5Vn7i8sftz27QP3t/mALOpbJXkXrhGvtN8eEqy0ffpjYmkcFUO+ODa4AqI5AH+Q/iALTF20hEwIhs8QugeNSQs9YMV2f06SzEkeHFfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727440866; c=relaxed/simple; bh=5KATFzNgkScuZth2ROnK3h5cFj1Y+CbalfVaUlt2OtI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EkUKS8oKrC+t5SA2WaGJRrGLVs147waG2Gst290rWBkFLfXCpGxbsoSqY1JhXrD+2HuqMmLLe2BI4n+So2tnXRdpti2Q0WjuuVy0SXJHkT/847FJj76k+0EFpsEA+ihPDXZziSpVnTliQsQaMeZQjWJytuLDd8XOlh/wYvfidzs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZSliPFWc; 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="ZSliPFWc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38547C4CEC4; Fri, 27 Sep 2024 12:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727440866; bh=5KATFzNgkScuZth2ROnK3h5cFj1Y+CbalfVaUlt2OtI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZSliPFWc0H8x9S5067F9KSyEvpZyHRb5Mpyz2gokE9CdAm+mQ+k8AMk8J9E/5vf2k /scpJgkjw/4QeTrzClQLZ1NIY8F2L6GR6jLACN/U1WlX7wjGZ3Wkyu1eps55yNGz2I eKQaH6L/EjdemRCPpxsaQaudq0T9KIvbyoQDofCA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46838: userfaultfd: don't BUG_ON() if khugepaged yanks our page table Date: Fri, 27 Sep 2024 14:40:06 +0200 Message-ID: <2024092753-CVE-2024-46838-5fa5@gregkh> X-Mailer: git-send-email 2.46.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=2242; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5KATFzNgkScuZth2ROnK3h5cFj1Y+CbalfVaUlt2OtI=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnfls+6NpnR6sytVyfMizn6rf2Lzt5qZWlbqOt47UQ3d +OFR4cPdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEOH8zLFjyQuRoVMkzlrmN m6V3CvYHPbq4UY9hDt++OUdPqrpbh3783j3p60ftUv/lNwA= 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: userfaultfd: don't BUG_ON() if khugepaged yanks our page table Since khugepaged was changed to allow retracting page tables in file mappings without holding the mmap lock, these BUG_ON()s are wrong - get rid of them. We could also remove the preceding "if (unlikely(...))" block, but then we could reach pte_offset_map_lock() with transhuge pages not just for file mappings but also for anonymous mappings - which would probably be fine but I think is not necessarily expected. The Linux kernel CVE team has assigned CVE-2024-46838 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 1d65b771bc08 and fixed in 6.6.51 with commit 4a594acc12d5 Issue introduced in 6.6 with commit 1d65b771bc08 and fixed in 6.10.10 with commit db978287e908 Issue introduced in 6.6 with commit 1d65b771bc08 and fixed in 6.11 with commit 4828d207dc51 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-2024-46838 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/userfaultfd.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/4a594acc12d5954cdc71d4450a386748bf3d136a https://git.kernel.org/stable/c/db978287e908d48b209e374b00d847b2d785e0a9 https://git.kernel.org/stable/c/4828d207dc5161dc7ddf9a4f6dcfd80c7dd7d20a