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: <52333be1169e543561c0a55d614f3097373a652b.camel@intel.com>
Date: Tue, 20 May 2025 20:47:01 +0000
From: "Verma, Vishal L" <vishal.l.verma@...el.com>
To: "lizhijian@...itsu.com" <lizhijian@...itsu.com>, "nvdimm@...ts.linux.dev"
	<nvdimm@...ts.linux.dev>
CC: "Williams, Dan J" <dan.j.williams@...el.com>, "Jiang, Dave"
	<dave.jiang@...el.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Weiny, Ira" <ira.weiny@...el.com>
Subject: Re: [PATCH 1/2] nvdimm/btt: Fix memleaks in discover_arenas()

On Fri, 2025-05-16 at 13:13 +0800, Li Zhijian wrote:
> kmemleak reported a memleak after the ndctl_test
> unreferenced object 0xffff88800e6cf2c0 (size 32):
>   comm "modprobe", pid 969, jiffies 4294698691
>   hex dump (first 32 bytes):
>     03 00 00 00 a0 0a 00 00 00 b0 b4 00 00 c9 ff ff  ................
>     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>   backtrace (crc 807f3e24):
>     __kmalloc_cache_noprof+0x331/0x410
>     nvdimm_namespace_attach_btt+0xa9b/0xcc0 [nd_btt]
>     platform_probe+0x45/0xa0
>     ...
>     load_module+0x21f9/0x22f0
> 
> faddr2line tells that (based on v6.15-rc4):
> $ ./scripts/faddr2line drivers/nvdimm/nd_btt.o
> nvdimm_namespace_attach_btt+0xa9
> nvdimm_namespace_attach_btt+0xa9b/0xcc0:
> log_set_indices at linux/drivers/nvdimm/btt.c:719
> (inlined by) discover_arenas at linux/drivers/nvdimm/btt.c:888
> (inlined by) btt_init at linux/drivers/nvdimm/btt.c:1583
> (inlined by) nvdimm_namespace_attach_btt at
> linux/drivers/nvdimm/btt.c:1680
> 
> It's believed that this was a false positive because the leaking size
> didn't match any instance in an arena.
> 
> However during looking into this issue, it's noticed that it does not
> release an initializing arena instance and instances in btt-
> >arena_list
> in some error paths.
> 
> Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
> ---
>  drivers/nvdimm/btt.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)

Reviewed-by: Vishal Verma <vishal.l.verma@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ