lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aVnoBRuEMazh2Q1F@pop-os.localdomain>
Date: Sat, 3 Jan 2026 20:09:41 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Shivani Gupta <shivani07g@...il.com>
Cc: netdev@...r.kernel.org, Jamal Hadi Salim <jhs@...atatu.com>,
	Jiri Pirko <jiri@...nulli.us>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	syzbot+8f1c492ffa4644ff3826@...kaller.appspotmail.com
Subject: Re: [PATCH] net/sched: act_api: avoid dereferencing ERR_PTR in
 tcf_idrinfo_destroy

On Fri, Jan 02, 2026 at 11:21:16PM +0000, Shivani Gupta wrote:
> syzbot reported a crash in tc_act_in_hw() during netns teardown where
> tcf_idrinfo_destroy() passed an ERR_PTR(-EBUSY) value as a tc_action
> pointer, leading to an invalid dereference.
> 
> Guard against ERR_PTR entries when iterating the action IDR so teardown
> does not call tc_act_in_hw() on an error pointer.
> 
> Link: https://syzkaller.appspot.com/bug?extid=8f1c492ffa4644ff3826
> Reported-by: syzbot+8f1c492ffa4644ff3826@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=8f1c492ffa4644ff3826
> Signed-off-by: Shivani Gupta <shivani07g@...il.com>

Thanks for the patch, Shivani.

Could you provide a Fixes tag for this while you are on it?

> ---
>  net/sched/act_api.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index ff6be5cfe2b0..994f7ffe26a5 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -940,6 +940,10 @@ void tcf_idrinfo_destroy(const struct tc_action_ops *ops,
>  	int ret;
>  
>  	idr_for_each_entry_ul(idr, p, tmp, id) {
> +		if (IS_ERR(p)) {
> +			WARN_ON_ONCE(1);

Hm, I guess we should remove this warning here since ERR_PTR is expected
in some corner case?

Regards,
Cong Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ