Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154236; b=202XrAAwDH1Rj8vAzD3g1NPPXg4VqmDNejUYa7jo6n8wkPkhIGqijScurSiCI1Mvv6Aq jmM9sJYoyRnkbiloswX0npfk4OshFErX0B/Hp5IRRqIAOoyTbImp/5tONPHG86QelssFr g3awVt1RlbGkKwZUDzxgC0TN0W3MZ+4B0klnx/fNtCPwD50HQTlDjMn96rB1+nfxOERR5 w8qQ+PHsKAIGyqqXefXyaYrNOpTOjVmn8wc5i0nZLmXM4JN2iPC+EaNgxp2h0NQiSVqoN bwPMspprONOP34+oAE+2KnCGwLeM/4xVGzEFuvfs7dHQl1vA27uu3JGPhwD5VaIhOSw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154236; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=uP5/p/1T+iI5tUleqAzp7NuYnCSMCvXseAnV0C0Qnkw=; b=IDD9UZMV/6qgG8ht780BPairQCnYmTPw7/hhbC6+9cLKbk63fo3k/TQTMSaONfWv2sDC b6iaUsKfb+Ty3NkJnquVX/ly4l9wWQca8pjV1SmCgjv1sUF5ILrqlPQsgJeZ4UEPjmY7F FeTkCOJuHwhGr17ciMtwlSxSbuaG5E01TESkh1ppEMiN18o4mJfG6qWe9Hqt+k0LgTMN0 2MKtu103lpixFD34lrkqeCH7RfrHC94jRecNbO7tgdWTnw3h3JPOj4Mt0m62gC/i+qj9h 3NFloWfE8JDbBjxIzHFTAvm3QiTv403I1+CWLSPnjZP3laWFJmm21BoxlegQaYgVcYw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=iJ54OB3F; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7FB9606A336 for ; Fri, 20 Nov 2026 05:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=iJ54OB3F Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCBCB1F000C4; Fri, 20 Nov 2026 05:57:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154236; bh=uP5/p/1T+iI5tUleqAzp7NuYnCSMCvXseAnV0C0Qnkw=; h=From:To:Cc:Subject:Date:Reply-To; b=iJ54OB3FaplzWGj4EFUDqjeKPzR8+0l2wjjMHA5DyiuPltGC58Pkd5h8Fv8mpIh4t h83iBxaRlcisbjQxJacRMWf/VbKa7xemeILqJkaStHKbGNnUbS9GPlAU0ToxKDMI9q 1EAWDmXh3hRFoMBI7RK0SG3I5dI/uWqfhwBNHwOI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99672: can: protect the receive lists with a per-device lock Date: Fri, 20 Nov 2026 06:50:58 +0100 Message-ID: <2026112051-CVE-2026-99672-43c0@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5562; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BSX6MJDgWBI+eI39WfXlzBZTJP3wQEymwyyvfOLkhNs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/79e/8eaccJp15R8de1XrY9sdZlSxLTnOvnFrxerWf 4UBATGeHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRxUIM81MuHHme8LSdIyxu Z4ni5/7yDTUPljAsaJcTORSjvoJV9ZhfXUaiGvNbS+OpAA== 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: can: protect the receive lists with a per-device lock The receive lists of a CAN device are located in the device's can_ml_priv and travel with the device when it is moved to another network namespace. But they are protected by the per-netns rcvlists_lock. So can_rx_unregister() needs dev_net(dev) to pick the right lock and silently returns when the passed namespace does not match dev_net(dev) anymore. isotp_release() and bcm_release() leave their notifier list before they take any lock that serializes against the netdev notifier, which runs under RTNL. When the bound device is moved to another namespace in this window, the notifier skips the socket and the release path has to remove the filters itself. isotp_release() passes the socket's namespace, which does not match dev_net(dev) anymore. bcm_rx_unreg() passes dev_net(dev), which can_rx_unregister() reads again for its check, so a namespace change between both reads makes the check fail as well. In both cases can_rx_unregister() silently returns. As can_rx_register() stores rcv->sk without a reference, the remaining receivers point to the freed socket (isotp) or the freed op (bcm): BUG: KASAN: use-after-free in isotp_rcv+0x1570/0x24d0 Read of size 1 at addr ffff888118130552 by task isotp_ns_uaf/578 can_rcv_filter+0x4af/0x8c0 can_receive+0x28d/0x3c0 can_rcv+0x2a9/0x310 __netif_receive_skb_one_core+0x21a/0x260 process_backlog+0x210/0x760 Besides this, the lists of a device are protected by the rcvlists_lock of the namespace that is passed in. Callers which pass dev_net(dev) read it at different times, so the same lists may be modified under the locks of different namespaces while the device is moved. Taking RTNL in these release paths is no option: raw_bind(), raw_setsockopt() and raw_release() already hold RTNL while adding and removing up to CAN_RAW_FILTER_MAX filters per socket, which unprivileged users can trigger repeatedly and which makes RTNL a global bottleneck. Instead fix the root cause and add a spinlock to struct can_dev_rcv_lists, which protects the receive lists of a CAN device or the 'any' CAN device lists of a namespace. It is initialized in can_set_ml_priv(), which is used by all CAN network devices. With this, can_rx_unregister() finds the subscription independently of the current namespace of the device. The protocols keep the device valid with their tracked references. The per-netns rcvlists_lock only protects the receive list statistics anymore, and CAN_RAW, CAN_BCM and CAN_ISOTP pass the namespace that has been used for can_rx_register(). So isotp_release() and bcm_release() now remove their filters correctly without RTNL, and raw_release(), raw_setsockopt(), raw_bind() and isotp_bind() do not need RTNL anymore and add and remove their filters under lock_sock(). To serialize bind() with NETDEV_UNREGISTER, bind() publishes the device inside the RCU section of its lookup, and raw_notify() and isotp_notify() recheck the bound device under lock_sock(). As RTNL does not keep NETDEV_DOWN out of bind() anymore, bind() checks IFF_UP after publishing the bound device, with a barrier pair against raw_notify() and isotp_notify(), so a down transition during bind() is still reported with ENETDOWN. The Linux kernel CVE team has assigned CVE-2026-99672 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc and fixed in 6.12.118 with commit 59d91f555ada337458c48316987b8ef46487f885 Issue introduced in 4.12 with commit 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc and fixed in 6.18.64 with commit 4b625dde57c0a40a933bf017ff93a64a7306aa43 Issue introduced in 4.12 with commit 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc and fixed in 7.3.5 with commit 228e795ec650c33ebbce8ba81ce983c84d64d889 Issue introduced in 4.12 with commit 8e8cda6d737d356054c9eeef642aec0e8ae7e6bc and fixed in 7.4-rc2 with commit 0f3ad9ab40e3dad06d5c0693806e07935ceedbc3 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-99672 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: include/linux/can/can-ml.h include/net/netns/can.h net/can/af_can.c net/can/bcm.c net/can/isotp.c net/can/raw.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/59d91f555ada337458c48316987b8ef46487f885 https://git.kernel.org/stable/c/4b625dde57c0a40a933bf017ff93a64a7306aa43 https://git.kernel.org/stable/c/228e795ec650c33ebbce8ba81ce983c84d64d889 https://git.kernel.org/stable/c/0f3ad9ab40e3dad06d5c0693806e07935ceedbc3