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 34C704E5354 for ; Thu, 17 Sep 2026 16:18:38 +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=1789661919; cv=none; b=IWmfLyQv5Mjwk7//G/l/OdPlnjkWkpMtY0RXsUINImbJMxmicwfEgCv8txlaWClHh3V0Yl1BrkphksKg+eO7JUXZ9IbIPYPwU78O/uI6aeGmJmtGA4pa/jHbCJNxwvyWei8zRM388pSACSLWSYPyn/N9yQJFDNF2ANXjz5yTkaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789661919; c=relaxed/simple; bh=1T2aIueAc5buDSZB26lpmdkA2+8Zy1Lqn+/FEgX9kXI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k+iy0QFIoJFMEu04reKG8eyV/ipIjIqhmGavCF9lAz+bBlHbjce2U89zGx8D2FGOlgUD/xXy9DA71API6LjTeo5pSwxh1QLlYfeS2TAVwcsFTWGWvZ0NaOHUhQgO/qbUJur5vyihdVNSR8ore9kwMO+XjPianLy+75xUMHC2AWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DWItC1FH; 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="DWItC1FH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C6A41F000FF; Thu, 17 Sep 2026 16:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789661918; bh=LlmiIxMXCJyid6quIyAp2t0VWp2dy5ApLHs0NdEo5Ws=; h=From:To:Cc:Subject:Date:Reply-To; b=DWItC1FHwxcZtyr9II7Jcjved+cjNSP+NTpOK7Kadn4jHu8CV3ofLv2KIp5th0+IE pA9dyKNra9uFCPYoTtfBCAFyVTB+Z14sCq1WcINMRLwxdsbEKU3Vva8Kr8B9bPGmn1 T5PLVGaddesvh0r1tC8ZB4wqLyu65UHJ9P2TDRdw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-90181: ublk: avoid teardown retry loop on xarray allocation failure Date: Thu, 17 Sep 2026 17:10:11 +0100 Message-ID: <2026091730-CVE-2026-90181-b6a3@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=3998; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0zZjrIBfU5cUYskABTH5Ija4HC1hgPbPtIOqkb1W8g0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlrBOoOr/o07ZnWKfnFUw5n2b1fmxrMdmPNnfg6btULf farD++82RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATuTqTYX6Ga/vSz2snbTm/ 6Xx9OKuYqdp9NkeGBfvfr/oa9mjCUZsDWQ3yZZlr49LY7QE= 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: ublk: avoid teardown retry loop on xarray allocation failure __ublk_shmem_remove_ranges() removes matching maple tree ranges in batches, but first stores each range into a temporary xarray so that the pages can be unpinned after dropping the maple tree lock. That temporary xarray is filled under the maple tree lock with xa_store(..., GFP_ATOMIC). If the store fails before mas_erase(), the current range is left in the tree and the helper returns false. The outer ublk_shmem_remove_ranges() loop then immediately retries the same range. While the atomic allocation keeps failing, the teardown path has no forward progress. The issue can be reproduced with radix_tree_node failslab injection after a SHMEM_ZC buffer has already been registered: # Kernel config: # CONFIG_BLK_DEV_UBLK=y # CONFIG_DEBUG_FS=y # CONFIG_FAULT_INJECTION=y # CONFIG_FAULT_INJECTION_DEBUG_FS=y # CONFIG_FAILSLAB=y echo 10 > /proc/sys/vm/nr_hugepages mkdir -p /tmp/htlb mount -t hugetlbfs none /tmp/htlb fallocate -l 4M /tmp/htlb/ublk_buf dev_id=$(kublk add -t null --shmem_zc \ --htlb /tmp/htlb/ublk_buf | awk -F '[ :]' '/dev id/ {print $3}') echo 1 > /sys/kernel/slab/radix_tree_node/failslab echo Y > /sys/kernel/debug/failslab/cache-filter echo Y > /sys/kernel/debug/failslab/ignore-gfp-wait echo 1 > /sys/kernel/debug/failslab/interval echo -1 > /sys/kernel/debug/failslab/times echo 100 > /sys/kernel/debug/failslab/probability kublk del -n "$dev_id" On the unfixed kernel the delete command was still running after 3 seconds. Disabling failslab made it return. The fault-injection stack showed: should_failslab kmem_cache_alloc_lru_noprof __xas_nomem __xa_store xa_store __ublk_shmem_remove_ranges ublk_cdev_rel ublk_ctrl_del_dev Remove the allocation from the teardown loop. Keep the existing batch limit, but collect {base_pfn, nr_pages} pairs in a fixed-size stack array. Once a matching range is found, the range is erased from the maple tree before dropping the lock, so each successful scan makes progress without depending on any GFP_ATOMIC allocation. With the same failslab settings, the fixed kernel completed "kublk del -n $dev_id" successfully in about 45 ms. The Linux kernel CVE team has assigned CVE-2026-90181 to this issue. Affected and fixed versions =========================== Issue introduced in 7.1 with commit 309e02dccf64e1b7bd2067abedc270e33b0aadf3 and fixed in 7.2.6 with commit b9cc6cc74daf6fef533dbe65d8cee779fea69600 Issue introduced in 7.1 with commit 309e02dccf64e1b7bd2067abedc270e33b0aadf3 and fixed in 7.3-rc1 with commit 4fd66a7f829f3f38f92a79081f0f2688aed644f0 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-90181 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/block/ublk_drv.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/b9cc6cc74daf6fef533dbe65d8cee779fea69600 https://git.kernel.org/stable/c/4fd66a7f829f3f38f92a79081f0f2688aed644f0