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 0B4A03F54C4 for ; Sat, 15 Aug 2026 12:32:39 +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=1786797161; cv=none; b=IjMmLNdtEthYF3YQ9IQIHG9PSge4PtbrIq49Rhxb1vBkFTeV2sZrK9lnXWmFozcsm47kjf19XN0ADGDktMUjfSYq05LFGeJvZmlPNAfAxuXjvh2oesHFtS0iFz6y8lekGCSykQ+Ox5/ajfzcI7jtsqbgHU+IPXiIqCVLuJFgRMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786797161; c=relaxed/simple; bh=m2ySiytd7FWn6w1g9ysqF+0QSu8YvBtxeRQb/YI/v80=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UL36W8Mh/rRxMV1PnAE+70FCfl5j9YvB99pOk+F2R7cSKdw/41OS7lIw+6QCEdlL6IuRTJeFRq+nxEFN0ntZIhGrIOggxmPyrV8ld22UPmx3r8/eFhBXbDIQnqBTeGSSSYPjYlga8UYdTLRU7Quzz7MZYH0sbr8mBNgyN885EKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LAK3qjvZ; 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="LAK3qjvZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C77C1F000E9; Sat, 15 Aug 2026 12:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786797159; bh=nxxzd94Pp5dQMEOvBEdW1/ZAi6q4Ygk4l+eAi5XouPw=; h=From:To:Cc:Subject:Date:Reply-To; b=LAK3qjvZO/+PX/D7eQLuUtoVD3/4ige2Q6iEEIJVSD76nuqft7H/s2Ya+0SR4nxT+ cV7RooyTM+R39y7PCu5mXxVyd9vdRv6naGc59EkF4j+c9PliU1Q2XAv0mhmH4FCvoy hfpvUYYs0v6JdyPzfk6dowFz0voa4UKL1OBSS98U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-74513: dibs: fix use-after-free of dmb_node in loopback attach/detach/unregister Date: Sat, 15 Aug 2026 21:26:34 +0900 Message-ID: <2026081543-CVE-2026-74513-c20c@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=4268; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UK78t+DTckpi035FPohx5uj5zMGw1VgtF/caMxOERaA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNUcfFwybkV+jMnC5v/n9h/d1rEd7XhTasf5+38MGy/ itJsnXvOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiMZMZFkx31nPx8J67zW2r 16/PhW4z3p6p+M4wz3JzZ+ftG6W/vT/+Dln8k0NP0mjheQA= 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: dibs: fix use-after-free of dmb_node in loopback attach/detach/unregister dibs_lo_attach_dmb(), dibs_lo_detach_dmb() and dibs_lo_unregister_dmb() look up the dmb_node under dmb_ht_lock, drop the lock and only then operate on the node's refcount. Nothing keeps the node alive across that window: __dibs_lo_unregister_dmb() removes the node from the hash table under the write lock and immediately frees it. A concurrent final put can therefore free the node between the lookup and the refcount operation: CPU0 (attach) CPU1 (owner unregisters) read_lock_bh(&dmb_ht_lock) find dmb_node (refcnt == 1) read_unlock_bh(&dmb_ht_lock) refcount_dec_and_test() 1 -> 0 write_lock_bh(&dmb_ht_lock) hash_del(&dmb_node->list) write_unlock_bh(&dmb_ht_lock) kfree(dmb_node) refcount_inc_not_zero(&dmb_node->refcnt) <-- use-after-free The same window exists for the refcount_dec_and_test() calls in the detach and unregister paths. Close the race structurally by making hash table membership and the refcount transitions atomic with respect to each other: - Perform the final refcount_dec_and_test() and hash_del() in a single dmb_ht_lock write-side critical section, in both the unregister and the detach path. Freeing the node still happens after the lock is dropped, which is safe because a node whose refcount reached zero has left the hash table and can no longer be found. - This establishes the invariant that any node found in the hash table holds at least one reference, and that the final reference can only be dropped under the write lock. dibs_lo_attach_dmb() can thus take its reference with a plain refcount_inc() while still holding the read lock; refcount_inc_not_zero() is no longer needed. __dibs_lo_unregister_dmb() no longer touches the hash table and is renamed to dibs_lo_free_dmb() accordingly. Note: commit cc21191b584c ("dibs: Move data path to dibs layer") moved the code to its current location; the race was introduced earlier by commit c3a910f2380f ("net/smc: implement DMB-merged operations of loopback-ism"). Tested SMC-D via ISM and dibs loopback. The Linux kernel CVE team has assigned CVE-2026-74513 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit c3a910f2380fe294d14e42af66af3d3eed8fecbf and fixed in 6.18.44 with commit c0837aeace96152d14b17fdd19d70102b6631a7d Issue introduced in 6.10 with commit c3a910f2380fe294d14e42af66af3d3eed8fecbf and fixed in 7.1.8 with commit 48c073f88c93707089a4214f21cb4c3de5aea6e4 Issue introduced in 6.10 with commit c3a910f2380fe294d14e42af66af3d3eed8fecbf and fixed in 7.2-rc6 with commit a10ea943356b9d70c5616a0a06f6fa97cfdaccb1 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-74513 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: drivers/dibs/dibs_loopback.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/c0837aeace96152d14b17fdd19d70102b6631a7d https://git.kernel.org/stable/c/48c073f88c93707089a4214f21cb4c3de5aea6e4 https://git.kernel.org/stable/c/a10ea943356b9d70c5616a0a06f6fa97cfdaccb1