[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<IA1PR11MB6170DBF824EA5CD87D99258FBBA42@IA1PR11MB6170.namprd11.prod.outlook.com>
Date: Mon, 24 Mar 2025 06:49:07 +0000
From: "Ren, Jianqi (Jacky) (CN)" <Jianqi.Ren.CN@...driver.com>
To: Simon Horman <horms@...nel.org>
CC: "stable@...r.kernel.org" <stable@...r.kernel.org>,
"patches@...ts.linux.dev" <patches@...ts.linux.dev>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jhs@...atatu.com" <jhs@...atatu.com>,
"xiyou.wangcong@...il.com"
<xiyou.wangcong@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com"
<edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
"michal.swiatkowski@...ux.intel.com"
<michal.swiatkowski@...ux.intel.com>
Subject: RE: [RFC PATCH 6.1.y] net/sched: act_mirred: don't override retval if
we already lost the skb
The context of this patch is changed compared with the original fix. Adding RFC means that I want to let the author or other experts to make a possible review to make sure the logic is right.
-----Original Message-----
From: Simon Horman <horms@...nel.org>
Sent: Saturday, March 22, 2025 02:01
To: Ren, Jianqi (Jacky) (CN) <Jianqi.Ren.CN@...driver.com>
Cc: stable@...r.kernel.org; patches@...ts.linux.dev; gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org; jhs@...atatu.com; xiyou.wangcong@...il.com; jiri@...nulli.us; davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com; netdev@...r.kernel.org; michal.swiatkowski@...ux.intel.com
Subject: Re: [RFC PATCH 6.1.y] net/sched: act_mirred: don't override retval if we already lost the skb
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Wed, Mar 19, 2025 at 09:22:25AM +0800, jianqi.ren.cn@...driver.com wrote:
> From: Jakub Kicinski <kuba@...nel.org>
>
> [ Upstream commit 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210 ]
>
> If we're redirecting the skb, and haven't called tcf_mirred_forward(),
> yet, we need to tell the core to drop the skb by setting the retcode
> to SHOT. If we have called tcf_mirred_forward(), however, the skb is
> out of our hands and returning SHOT will lead to UaF.
>
> Move the retval override to the error path which actually need it.
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Fixes: e5cf1baf92cb ("act_mirred: use TC_ACT_REINSERT when possible")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Acked-by: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Jianqi Ren <jianqi.ren.cn@...driver.com>
> Signed-off-by: He Zhe <zhe.he@...driver.com>
> ---
> Verified the build test
Sorry if it is obvious, but I'm confused by the intention of posting an RFC for stable. Are you asking for buy-in regarding backporting this patch to 6.1.y because for some reason it hasn't already propagated there?
Powered by blists - more mailing lists