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] [day] [month] [year] [list]
Message-ID: <0574c34c-60a8-8d8d-38b1-962898e55801@huawei.com>
Date:   Fri, 20 Nov 2020 16:29:52 +0800
From:   "wanghai (M)" <wanghai38@...wei.com>
To:     Julian Anastasov <ja@....bg>
CC:     <horms@...ge.net.au>, <pablo@...filter.org>,
        <kadlec@...filter.org>, <fw@...len.de>, <davem@...emloft.net>,
        <kuba@...nel.org>, <christian@...uner.io>,
        <hans.schillstrom@...csson.com>, <lvs-devel@...r.kernel.org>,
        <netfilter-devel@...r.kernel.org>, <coreteam@...filter.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] ipvs: fix possible memory leak in
 ip_vs_control_net_init


在 2020/11/20 2:22, Julian Anastasov 写道:
> 	Hello,
>
> On Thu, 19 Nov 2020, Wang Hai wrote:
>
>> kmemleak report a memory leak as follows:
>>
>> BUG: memory leak
>> unreferenced object 0xffff8880759ea000 (size 256):
>> comm "syz-executor.3", pid 6484, jiffies 4297476946 (age 48.546s)
>> hex dump (first 32 bytes):
>> 00 00 00 00 01 00 00 00 08 a0 9e 75 80 88 ff ff ...........u....
[...]
>> Reported-by: Hulk Robot <hulkci@...wei.com>
>> Signed-off-by: Wang Hai <wanghai38@...wei.com>
>> ---
>>   net/netfilter/ipvs/ip_vs_ctl.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
>> index e279ded4e306..d99bb89e7c25 100644
>> --- a/net/netfilter/ipvs/ip_vs_ctl.c
>> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
>> @@ -4180,6 +4180,9 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)
>>   	return 0;
> 	May be we should add some #ifdef CONFIG_PROC_FS because
> proc_create_net* return NULL when PROC is not used. For example:
>
> #ifdef CONFIG_PROC_FS
> 	if (!proc_create_net...
> 		goto err_vs;
> 	if (!proc_create_net...
> 		goto err_stats;
> 	...
> #endif
> 	...
>
>>   err:
> #ifdef CONFIG_PROC_FS
>> +	remove_proc_entry("ip_vs_stats_percpu", ipvs->net->proc_net);
> err_percpu:
>> +	remove_proc_entry("ip_vs_stats", ipvs->net->proc_net);
> err_stats:
>> +	remove_proc_entry("ip_vs", ipvs->net->proc_net);
> err_vs:
> #endif
>
>>   	free_percpu(ipvs->tot_stats.cpustats);
>>   	return -ENOMEM;
>>   }
>> -- 
> Regards
>
> --
> Julian Anastasov <ja@....bg>
>
> .

Thanks for your advice, I just sent v2

“[PATCH net v2] ipvs: fix possible memory leak in ip_vs_control_net_init”

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ