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: <Y4unik6y8a0MuoFt@pop-os.localdomain>
Date:   Sat, 3 Dec 2022 11:46:18 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Li Qiong <liqiong@...china.com>
Cc:     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>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yu Zhe <yuzhe@...china.com>
Subject: Re: [PATCH] net: sched: fix a error path in fw_change()

On Thu, Dec 01, 2022 at 11:15:32PM +0800, Li Qiong wrote:
> The 'pfp' pointer could be null if can't find the target filter.
> Check 'pfp' pointer and fix this error path.

Did you see any actual kernel crash? And do you have a reproducer too?
Please include them if you do.

> 
> Signed-off-by: Li Qiong <liqiong@...china.com>
> ---
>  net/sched/cls_fw.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
> index a32351da968c..b898e4a81146 100644
> --- a/net/sched/cls_fw.c
> +++ b/net/sched/cls_fw.c
> @@ -289,6 +289,12 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
>  			if (pfp == f)
>  				break;
>  
> +		if (!pfp) {
> +			tcf_exts_destroy(&fnew->exts);
> +			kfree(fnew);
> +			return err;


BTW, err is 0 here, you have to set some error here.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ