From mboxrd@z Thu Jan 1 00:00:00 1970 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=1796047102; b=qiQQRV0DIu6I4ln6maaW8SB+Lmnb2J6oWq28IjD9k+KwXloMcKmvrQsbhWS3Z1aVZnY5 7COXV5ve4qnTl/sEmkqNbEkOveScIxSHp395pIE7JGARjeFgfbs3j3cZgj07Lk7qPsY8F nn5nAhrkkZ9FBGWkjDB/KKe4+4bogSycGbu8tougaNvlWOWvVm4+Gp7YktOfq69wp0a7E 5AizzBNAYcAajPffYTSYUNGB3FORjcwVNP7AWJY8YrfyEK7+onf2WVUie7epRuwFXkns8 HQ+zjYkYKvrOIn2eFJLsOtHPJYJl3nzz/gzW/WH8ybL4mLoQssx1juUu5zXPiFhYM8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047102; 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=gfC3ufHq9vDYRlh5Uc1cNk0fMuzHg+Wb3NCdIcCTIqA=; b=vMzfS7iTF9mnRV7bMyl5H7aKyzC3LmVV2BxohNiiv7femIyJljmZs2vs0vGCtTS8ssPP 5XmyNdHoWb4MZX9rI0mbzgQsvkIgr9RaVNDmez4H0XDYJMibibjkM1zpYTL3G0kVkydag Dgm8Mmv0cWUn4VhPZPucj5Egg7xloO+pMOBNG2uAo7/B3TnIGi8Aygwv5SfbkZTcSfk1D h8iHrbm2h2aJ0X+5nwUAHAIpovtcWj7ONDE6/a1g3KdEvNAvLRZGze3i2PsPpGM1tg1IU npCT68iuspFFPwXQ0Td5yJfoGumd1KIlVmCY2ulQLxLYCx6TiS9sysOrIJipoSY0XhQ== 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=PG5jIi1J; 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 1D212606A31C for ; Mon, 30 Nov 2026 13:58:21 +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=PG5jIi1J Received: by smtp.kernel.org (Postfix) with ESMTPSA id 123A01F000C1; Mon, 30 Nov 2026 13:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796047101; bh=gfC3ufHq9vDYRlh5Uc1cNk0fMuzHg+Wb3NCdIcCTIqA=; h=From:To:Cc:Subject:Date:Reply-To; b=PG5jIi1JV7us5bdzPGahQWbGDKXsyxADG5Kxzt29sYo2P7fmmgCoNiSgq2v8M7S+P q4svqRp3cS3f0XB32yEDKUnRWUI9B8B6QWe9r9tOsGj5RICnJlGxccVxnLLrA0VcM7 s+6BA7ejE+eRJfQaexzvENR2vIGPeOgwIqSRJ3NM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139166: devlink: region: fix snapshot id leak on kernel-allocated ids Date: Mon, 30 Nov 2026 14:32:55 +0100 Message-ID: <2026113045-CVE-2026-139166-1930@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=3510; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ORTA89gKimLx+nAouqnsTHQMugLOFSurSDSWReThdOo=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8VQe3XMkRKvoXzFAfu3L3u6lXF5vOnddUE3Ds2jKum zuPTPPZ2BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWanHMD/l4LIAU6b4Up9N Zz9n854+5+kxu4VhwaRoUUsvH8vv9ydX3E0t25MnuW/WdwA= 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: devlink: region: fix snapshot id leak on kernel-allocated ids When DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel allocates one with __devlink_region_snapshot_id_get(). That helper counts the caller as a user of the id, and the caller must release this hold once it is done. devlink_nl_region_new_doit() never drops it. The refcount of the id goes 1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot is deleted the count only drops to 1, so the id is never erased from the snapshot_ids xarray. The id then stays in use for the lifetime of the devlink instance: requesting a snapshot with that explicit id fails with -EEXIST, and there is no snapshot left to delete to clean it up. Reproducer steps: # devlink region new pci/0000:13:00.0/device-caps pci/0000:13:00.0/device-caps: snapshot 0 # devlink region del pci/0000:13:00.0/device-caps snapshot 0 # devlink region new pci/0000:13:00.0/device-caps snapshot 0 kernel answers: File exists Drop the caller's reference right after the snapshot has been created, as the snapshot then holds its own. The Linux kernel CVE team has assigned CVE-2026-139166 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 043b3e22768d5d909cb1474fc21ae2fbaf026c0c and fixed in 6.6.163 with commit 242d67e369ec055480eabe893f61b5a94c316aed Issue introduced in 5.8 with commit 043b3e22768d5d909cb1474fc21ae2fbaf026c0c and fixed in 6.12.119 with commit 5c6be0c090fc6f5d88aef30447c2abdbbb9a8e2b Issue introduced in 5.8 with commit 043b3e22768d5d909cb1474fc21ae2fbaf026c0c and fixed in 6.18.65 with commit 33393bd60015355eba67f96ef084a7e1a0e03a5f Issue introduced in 5.8 with commit 043b3e22768d5d909cb1474fc21ae2fbaf026c0c and fixed in 7.3.6 with commit 5ecaa25ea1fc4b5df73ac019915e7785c7df50c3 Issue introduced in 5.8 with commit 043b3e22768d5d909cb1474fc21ae2fbaf026c0c and fixed in 7.4-rc1 with commit ef8f0a1d888e0280452792f6d4edad237c934a51 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-139166 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/devlink/region.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/242d67e369ec055480eabe893f61b5a94c316aed https://git.kernel.org/stable/c/5c6be0c090fc6f5d88aef30447c2abdbbb9a8e2b https://git.kernel.org/stable/c/33393bd60015355eba67f96ef084a7e1a0e03a5f https://git.kernel.org/stable/c/5ecaa25ea1fc4b5df73ac019915e7785c7df50c3 https://git.kernel.org/stable/c/ef8f0a1d888e0280452792f6d4edad237c934a51