From mboxrd@z Thu Jan 1 00:00:00 1970 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 F344E35DA79 for ; Sat, 15 Aug 2026 06:14:53 +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=1786774495; cv=none; b=DWoKrYcxXZfSW2Bp1qnu5yR2mWX9wfs9k6EYvi/Kp5PUu6GapT7XChiujmJWlQTdIL/tkj2Dith607EcgCtyZwWJJ9TI8vigCVxsYHCqSmRWD266qbRL4o0xSzqcxgZGdZyrh0NU8RNddd+ec2qM//Wt08qM9stTwjRyKXNQsIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786774495; c=relaxed/simple; bh=gALGeVvxDJjKV/6ylAcR1wOHRUlU/TD2TFMuF1rQgSw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=F7C7M6a47o+h5Iaj18DWqNum9/2+42t+aZrwqFHb6guLhaVY/9CenFa237dsalDcfsNh5eLUkjgSeROJLqkbzQRGdIvxkARDqz+VIJnqUqQN/jKejAUPaG1py3qLTSUD4ZMxKIbYmi3PUslFaHaZ+dT+trTy+jHvadJsZX6jETE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RS3ORr8L; 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="RS3ORr8L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5554F1F000E9; Sat, 15 Aug 2026 06:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786774493; bh=O0ji6grio2nktgFV+qrTOFGro1bl3t6dCFv9sf7nv7k=; h=From:To:Cc:Subject:Date:Reply-To; b=RS3ORr8LU6PRBNYjreokS4oLbsUPX5Msjapwq+oUDdFvqIFiYWiTWikiz6UqsB1zd 1EsUdlTT/Yxdnz+XR2f3Y6T5b7CCgAGdeDeBkF/UUwbcwy8FfiGlsrPCoExYR0kuQr p9jOMbfYzg+Hej46uy8YzvXSpyvgGIRyozn3xEQY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-72125: can: isotp: fix use-after-free race with concurrent NETDEV_UNREGISTER Date: Sat, 15 Aug 2026 15:03:24 +0900 Message-ID: <2026081529-CVE-2026-72125-d585@gregkh> X-Mailer: git-send-email 2.55.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=3906; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9iRlkX/gn5SbsisyaPi/V5Txl4GaPGCDq5p4sgzVwpM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNDDt5nj31iJtl/a5PfV3t1J2/pveISX6V59yxSHSOH M/MKbZPO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiljUMCy7Lqau7tTra5+5v 0lTbbLNymc6TCQwL1n/TqVix+E5Gw/aK01kSW862bos9BgA= 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: isotp: fix use-after-free race with concurrent NETDEV_UNREGISTER isotp_release() looked up the bound network device via dev_get_by_index() using the stored ifindex. During device unregistration the device is unlisted from the ifindex hash before the NETDEV_UNREGISTER notifier chain runs, so a concurrent isotp_release() could find no device, skip can_rx_unregister() entirely, and still proceed to free the socket. Since isotp_release() had already removed itself from the isotp notifier list at that point, isotp_notify() would never get a chance to clean up either, leaving a stale CAN filter that keeps pointing at the freed socket. Fix this the same way raw.c already does: hold a tracked reference to the bound net_device in the socket (so->dev/so->dev_tracker) from bind() onward instead of re-resolving it from the ifindex, and serialize bind()/release() with rtnl_lock() so that so->dev is always consistent with what the NETDEV_UNREGISTER notifier sees. so->dev stays valid regardless of ifindex-hash unlisting, and is only ever cleared by whichever of isotp_release()/isotp_notify() gets there first, so the filter is always removed exactly once. isotp_bind() now rejects a (re)bind with -EAGAIN while so->[tx|rx].state isn't ISOTP_IDLE yet, so a timer left running by a prior NETDEV_UNREGISTER can't act on a newly bound so->ifindex. Both checks share the same lock_sock() section, so there is no window in which a concurrent isotp_notify() clearing so->bound could be missed. The Linux kernel CVE team has assigned CVE-2026-72125 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit e057dd3fc20ffb3d7f150af46542a51b59b90127 and fixed in 6.6.148 with commit 0b811c4bbe3ec9ad611e90a540fe8b51b3bb8a96 Issue introduced in 5.10 with commit e057dd3fc20ffb3d7f150af46542a51b59b90127 and fixed in 6.12.101 with commit 43884dc7963beef2328f507f4fe680bdc173eb80 Issue introduced in 5.10 with commit e057dd3fc20ffb3d7f150af46542a51b59b90127 and fixed in 6.18.40 with commit 7bef39ba76eb7307ed22a50329e0f5776dbeda58 Issue introduced in 5.10 with commit e057dd3fc20ffb3d7f150af46542a51b59b90127 and fixed in 7.1.5 with commit e442b62ba5a7756c17e05a77b32cdd085a2b6138 Issue introduced in 5.10 with commit e057dd3fc20ffb3d7f150af46542a51b59b90127 and fixed in 7.2-rc4 with commit 20bab8b88baac140ca3701116e1d486c7f51e311 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-72125 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/can/isotp.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/0b811c4bbe3ec9ad611e90a540fe8b51b3bb8a96 https://git.kernel.org/stable/c/43884dc7963beef2328f507f4fe680bdc173eb80 https://git.kernel.org/stable/c/7bef39ba76eb7307ed22a50329e0f5776dbeda58 https://git.kernel.org/stable/c/e442b62ba5a7756c17e05a77b32cdd085a2b6138 https://git.kernel.org/stable/c/20bab8b88baac140ca3701116e1d486c7f51e311