Article View: linux.kernel.netdev
Article #1742Re: [PATCH net v2] net/sched: fix use-after-free in __tcf_action_put()
From: Simon Horman
Date: Sat, 10 Oct 2026 14:51
Date: Sat, 10 Oct 2026 14:51
25 lines
6327 bytes
6327 bytes
On Thu, Oct 08, 2026 at 06:13:49PM +0000, Jérémy Jean wrote:
> __tcf_action_put() decrements the reference count before decrementing the
> binding count. Another thread can free the action between these operations,
> causing the binding-count update to access freed memory. KASAN reports it
> as:
>
> BUG: KASAN: slab-use-after-free in __tcf_action_put+0x327/0x340
> Write of size 4 at addr ff11000000d46420 by task tc-put-pause/64
>
> Hold the action IDR mutex across both counter updates and IDR removal,
> keeping cleanup outside the lock.
>
> Fixes: 16af6067392c ("net: sched: implement reference counted action release")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> ---
>
> Change in v2:
> - Invert the condition of the test.
>
> v1: https://lore.kernel.org/all/20260930211839.620410-2-Jeremy.Jean@oss.cyber.gouv.fr/
Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID:
<20261010145121.GR83879@horms.kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344254-linux-kernel-netdev=dewy.ruReferences:
<20261008181348.527035-2-Jeremy.Jean@oss.cyber.gouv.fr>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344254-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net/sched: fix use-after-free in __tcf_action_put() Date: Sat, 10 Oct 2026 15:51:21 +0100 Organization: Usenet Network Message-ID: <20261010145121.GR83879@horms.kernel.org> References: <20261008181348.527035-2-Jeremy.Jean@oss.cyber.gouv.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1352363"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:398XzZJeyuyxzBkNhzp0EO8tfZQ= sha256:Bf93WSEJGvHDhPPaJ+CCvizT3nJOELIOOnTTw6ih6QQ= sha1:tEOpJCcpafAjbIzvPyXYoqtRJbY= sha256:pAUiHIyoXOIVvzucA9QbhGlco9XzrSMDmhWrX2lhXv0= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 335F710F915; Sat, 10 Oct 2026 17:52:45 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.341 X-Spam-Status: No, score=-1.341 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sJh5GH60wYpa; Sat, 10 Oct 2026 17:52:41 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344254-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3370610F8C2; Sat, 10 Oct 2026 17:52:37 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 4A23D26A70; Sat, 10 Oct 2026 14:51:27 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B790139934C; Sat, 10 Oct 2026 14:51:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n1+7Ui9x" X-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 B0926364927; Sat, 10 Oct 2026 14:51:25 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791643886; cv=none; b=FeBu/s3v15zcqbHSlsw6GFL4+jese2Ch25VPubp3eXjynJNcmoeRyGPRx3V9Vz5/CYJPicRa1JLN/+X3UhA+FyJ7r5vZSFIHeRXE2rx4MujabEI2UqVoPld2ZWuxVrblt5Z6z4HStRD29WvC0Oq+oXdpzLGXVOTaHnuZpVLXieA= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791643886; c=relaxed/simple; bh=rkRWui3LY6orgxucn2Y46UtrJ1dD/K8Rmw3vAsBp69o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GVyXmk3KSLvv3aIvByKCJCZ7nlR5GrLIYQYUbrmrMgCXZJa14EHnnrB+GrXr9x5ha42fAp753SI2obA3fFTUCxTH7evqLl5IWbrvr7nhp9dHWw9PzVtwe5Cy/fbwZN3Iuz5dIshRZWFUh2MjWHAYbxTM2l3TxlsACwkeC2Cma7M= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n1+7Ui9x; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF89C1F000FF; Sat, 10 Oct 2026 14:51:23 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791643885; bh=9Q5gjJ66FTRizaXe0WZgZBw1+G2lMnbokKf1f9WGivw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=n1+7Ui9xtgv+QVg1uR9ioSkralEZsSJgDkNbrNKsvqj0LC07QC8WHmhftgYebYizy dRhkpS3jusVUXGD97QhVJ4vTKQ9kVuxZGgJk0p3VlOVxtNN6JrB6kEKr17o1ZuQFVl jsxP6pFIGP40KNCS6sliAHIQ8UbI71VavUzDQ40zK4Yf5ISXAb3yzAWxNgYH5OvxfV AA8T29N44Z7CbwCLnatnzpdL6b+e6vJY08DYNFbO7lBWRVux/jCfUDRBDZO+qs68vn yWGjO8RCMQb2sh6sj3l1rlDCDsLqVV397TTBmTtwN69gQfHJ9cexIFj1/iZgrGFO4Z Td3axMYKbX0ZQ== X-Cc: Jamal Hadi Salim <jhs@mojatatu.com>, Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261008181348.527035-2-Jeremy.Jean@oss.cyber.gouv.fr>