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 0940E48A8B8 for ; Fri, 25 Sep 2026 10:30:12 +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=1790332213; cv=none; b=RggjievJybgNYHCEaIqXukYpXqvtK6HG/zBEl3iFna4aDzubC2dDOj6iTGA0+UrYPCSFykg1H/hrh6V7bHYiUhHrwmpLM2anbdKKiSMqsbu1NNDo9F6yZh+cNcuyaFucvcDGMyUG218Lsyq8bqDgi8yivh7IVsUBYDqyRusvMvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332213; c=relaxed/simple; bh=BVvoUsQdEeLx6AzKlUsZctu4K5jdwLP0VbbGv67vJ6U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Mi7HqLF4G1fkNZXvqXXZ5nXXlEGKcKnINaddcuOg5KrOjf/dbl+S7hpGp6oceH6OYedqZJUOMtcx8mnQXamLUP17VRLTj+cFgmU/7KC9aisJH8fr7W9shrLS3c24+G05zoiWsWg9VY9xUFRCjae5Hxj8qh+Tiwp48OuIFM5JutY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KnjGAyhP; 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="KnjGAyhP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 626811F000FF; Fri, 25 Sep 2026 10:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332211; bh=ysi0IjPQMHUrYHRh5gXoKHhvKh+cbzRUmiuotPS0P2U=; h=From:To:Cc:Subject:Date:Reply-To; b=KnjGAyhP3Uycsq4xV2UWCQ9SRt8bjvJ6z7F8XMIXvtyIPsYNqKXVUiZ5g6fvsrxwM p1xKPxUqf4o6//4fMQXP+nmUDUqE2p2QBu5ax/EKAswGkaf1//EEObXo9ZFH9gM5wT ocIaiLjTTVqLVu42OapD04IrhXBNrYufkcT3QY3Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97959: net/sched: cls_route: free emptied bucket on filter move Date: Fri, 25 Sep 2026 12:24:22 +0200 Message-ID: <2026092515-CVE-2026-97959-3534@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=3646; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=D7roTbzduUtRtve1vKRA0SB79Y2b4cvk8c0eSytcmn0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvMNnTHvkrVP8e+JOF9kNDbqBjPv5JLP2XE2KOZPU+ 8cpL/BHRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyk4jjDXCGeFp8842/rTj7K 7ItfHXaiuLZsMsOCXem6snkNMdZJ7SX7NOrSJ3dWOpYBAA== 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: net/sched: cls_route: free emptied bucket on filter move route4_change can move an existing filter to a different top-level bucket: route4_set_parms recomputes the handle from TCA_ROUTE4_TO/ FROM/IIF, and the handle-mismatch check is gated on the 'new' flag, so for an existing filter the new handle may differ from the old one and land in a different bucket. When this happens, the filter is unlinked from the old bucket, but the bucket itself is never freed once it goes empty. The stale empty bucket remains in head->table[], causing route4_delete to report *last=false even after the last live filter is gone. That pins the empty tcf_proto and causes a leak. Fix this by refcounting the filters linked to a bucket and freeing the bucket when the count drops to zero. The existing scan in route4_delete goes away with it. The count is updated at all sites that link or unlink a filter during add, change and delete, and the bucket is dropped from head->table[] as soon as it reaches zero. Conditions to recreate the bug: CONFIG_NET_CLS_ROUTE4=y, CONFIG_NET_SCH_INGRESS=y, CONFIG_NET_CLS_ACT=y. tc qdisc replace dev lo clsact tc filter add dev lo ingress protocol ip pref 100 route from 1 to 1 tc filter change dev lo ingress protocol ip pref 100 handle 0x10001 \ route from 1 to 2 tc filter del dev lo ingress protocol ip pref 100 handle 0x10002 \ route from 1 to 2 tc filter show dev lo ingress | grep -c 'pref 100 route chain 0 ' The Linux kernel CVE team has assigned CVE-2026-97959 to this issue. Affected and fixed versions =========================== Issue introduced in 4.1 with commit 1e052be69d045c8d0f82ff1116fd3e5a79661745 and fixed in 6.12.111 with commit 2e2f130951d34871b0643bf700164d97cff4b427 Issue introduced in 4.1 with commit 1e052be69d045c8d0f82ff1116fd3e5a79661745 and fixed in 6.18.53 with commit f8495d67434e1cb7e511297687ca55fdb28e4c20 Issue introduced in 4.1 with commit 1e052be69d045c8d0f82ff1116fd3e5a79661745 and fixed in 7.2.7 with commit 81dd117c04422c6d0c7974aba9fa6a0ba370959b Issue introduced in 4.1 with commit 1e052be69d045c8d0f82ff1116fd3e5a79661745 and fixed in 7.3-rc3 with commit 1853f30cf5c84971f99788a76207c6f745380896 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-97959 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/sched/cls_route.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/2e2f130951d34871b0643bf700164d97cff4b427 https://git.kernel.org/stable/c/f8495d67434e1cb7e511297687ca55fdb28e4c20 https://git.kernel.org/stable/c/81dd117c04422c6d0c7974aba9fa6a0ba370959b https://git.kernel.org/stable/c/1853f30cf5c84971f99788a76207c6f745380896