Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 DFEAD480DEC for ; Sun, 18 Oct 2026 16:19:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340375; cv=none; b=AnNfN2wSW2C+A9xXJXmpUfvWIJST+PXaUaOlaeiPDLNO2cl2UNh3aSUJbND6cjarff30tgUJDb9C85nFRUH6O01QcQM37qxIycJ6EwMKDHNGWnjPpmdLALZbeqKcjdVwm7F2luqWyl6w1a8KMhqokeAjEW70lcvjtsR+oMeMCh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340375; c=relaxed/simple; bh=UYOD19AZ3bOB2qfpFQC4owLa623WU7NODVKtHAiGTXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=E08+/5Ulu7CmW3COqIp2FzIb1jpYazCPHoWReIZ22OFsfjz2patEg1JNjwF/tQCoKQXnzf1un3meigMCGgcZrOhi1tOUviWpAclR9FnxYCnpSwfWg+0N5cZj/tWFsu1NC+pDJ0dJfIWdXOELVfc88vag7vW/LtJis3kkqKkeaec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=co6tJHvF; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="co6tJHvF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D6461F000C4; Sun, 18 Oct 2026 16:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792340374; bh=X3xu/2oJFyZ2az4WqhmuDR0/IDVPuhRXlSiUeFLTl2c=; h=From:To:Cc:Subject:Date:Reply-To; b=co6tJHvFixMeL2/8DYpVCFP9g3QUT0+vrXrrUcrmbrgXWYZFewHD7CH7cI2I/o//U SwtJ/lEQRXo6pN9orjMxqWBB/oB7jQebu9Hy9jmIPXhRp8ht8Zw7whcgIlY3iYz/sE zOu2UzjaJ/5iL9CTHAi6EAGVBvCEGSAPazwEnNvU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98812: net/mctp: publish the mctp_dev only after it is initialised Date: Sun, 18 Oct 2026 17:46:27 +0200 Message-ID: <2026101827-CVE-2026-98812-af7b@gregkh> X-Mailer: git-send-email 2.56.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=3687; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HWbQii275/MBG1V06f6kr2q139l24c1pO5KArvJUo6k=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXkbP0WI81ddjcf7VdZ7EM9NiF0c/iUmd3mdoVXTv3 d2ZZr0HO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiYbEM86M84ubO/aS2kp3t X2nQ2cv770pZazPMdxC8LTvVsObeAr+fJrUGqgp/fmy9CgA= 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: net/mctp: publish the mctp_dev only after it is initialised mctp_add_dev() links the new mctp_dev into dev->mctp_ptr before mdev->dev is assigned, so a reader that picks the device up in that window dereferences a net_device pointer that is still NULL: KASAN: null-ptr-deref in range [0x00000000000000b0-0x00000000000000b7] Call Trace: ? __pfx_mctp_sendmsg (./include/linux/sockptr.h:49) ? __pfx_mctp_dst_output (net/mctp/route.c:41) ? selinux_socket_sendmsg (security/selinux/hooks.c:5278) ____sys_sendmsg (net/socket.c:775 (discriminator 1) net/socket.c:790 (discriminator 1) net/socket.c:2684 (discriminator 1)) ? __pfx_____sys_sendmsg (net/socket.c:1131) ? __pfx_copy_msghdr_from_user (net/socket.c:2590) ? update_cfs_rq_load_avg (kernel/sched/fair.c:5478) ___sys_sendmsg (net/socket.c:2738) ? __pfx____sys_sendmsg (net/socket.c:2625) ? perf_event_task_tick (./include/linux/rcupdate.h:838) ? sched_tick (kernel/sched/core.c:5818) ? clockevents_program_event (kernel/time/clockevents.c:372) ? fdget (./include/linux/rcupdate.h:873 fs/file.c:1100) __sys_sendmsg (net/socket.c:2770) ? __pfx___sys_sendmsg (net/socket.c:2751) do_syscall_64 (arch/x86/entry/syscall_64.c:63) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) Fix by publishing only once the object is fully initialised: __mctp_dev_get() runs under rcu_read_lock() only and hands this object to readers as soon as mctp_ptr is assigned, so they must never observe mdev->dev == NULL. The Linux kernel CVE team has assigned CVE-2026-98812 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 583be982d93479ea3d85091b0fd0b01201ede87d and fixed in 6.12.113 with commit af6e4f931afc2d670d133aa2bedc8b6e3753c618 Issue introduced in 5.15 with commit 583be982d93479ea3d85091b0fd0b01201ede87d and fixed in 6.18.56 with commit 63120572edde85bb2b70b0ed4d4817ed52247613 Issue introduced in 5.15 with commit 583be982d93479ea3d85091b0fd0b01201ede87d and fixed in 7.2.10 with commit f37f42e6e039a48c2dcf6c079b9f7fbc864ab7ef Issue introduced in 5.15 with commit 583be982d93479ea3d85091b0fd0b01201ede87d and fixed in 7.3-rc6 with commit aadf655e8ea9a8ffa24bb8d69f504572e8d18181 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-2026-98812 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: net/mctp/device.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/af6e4f931afc2d670d133aa2bedc8b6e3753c618 https://git.kernel.org/stable/c/63120572edde85bb2b70b0ed4d4817ed52247613 https://git.kernel.org/stable/c/f37f42e6e039a48c2dcf6c079b9f7fbc864ab7ef https://git.kernel.org/stable/c/aadf655e8ea9a8ffa24bb8d69f504572e8d18181