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: <4c000115-4069-5277-ce82-946f2fdb790a@linux.alibaba.com>
Date:   Wed, 1 Sep 2021 10:21:27 +0800
From:   王贇 <yun.wang@...ux.alibaba.com>
To:     Paul Moore <paul@...l-moore.com>,
        "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Revert "net: fix NULL pointer reference in
 cipso_v4_doi_free"

Hi Paul, it confused me since it's the first time I face
such situation, but I just realized what you're asking is
actually this revert, correct?

Regards,
Michael Wang

On 2021/9/1 上午10:18, 王贇 wrote:
> This reverts commit 733c99ee8be9a1410287cdbb943887365e83b2d6.
> 
> Since commit e842cb60e8ac ("net: fix NULL pointer reference in
> cipso_v4_doi_free") also applied to fix the root cause, we can
> just revert the old version now.
> 
> Suggested-by: Paul Moore <paul@...l-moore.com>
> Signed-off-by: Michael Wang <yun.wang@...ux.alibaba.com>
> ---
>  net/ipv4/cipso_ipv4.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
> index 7fbd0b5..099259f 100644
> --- a/net/ipv4/cipso_ipv4.c
> +++ b/net/ipv4/cipso_ipv4.c
> @@ -465,16 +465,14 @@ void cipso_v4_doi_free(struct cipso_v4_doi *doi_def)
>  	if (!doi_def)
>  		return;
> 
> -	if (doi_def->map.std) {
> -		switch (doi_def->type) {
> -		case CIPSO_V4_MAP_TRANS:
> -			kfree(doi_def->map.std->lvl.cipso);
> -			kfree(doi_def->map.std->lvl.local);
> -			kfree(doi_def->map.std->cat.cipso);
> -			kfree(doi_def->map.std->cat.local);
> -			kfree(doi_def->map.std);
> -			break;
> -		}
> +	switch (doi_def->type) {
> +	case CIPSO_V4_MAP_TRANS:
> +		kfree(doi_def->map.std->lvl.cipso);
> +		kfree(doi_def->map.std->lvl.local);
> +		kfree(doi_def->map.std->cat.cipso);
> +		kfree(doi_def->map.std->cat.local);
> +		kfree(doi_def->map.std);
> +		break;
>  	}
>  	kfree(doi_def);
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ