Re: [syzbot] [PATCH] Test memory leak in ovl_parse_param

syzbot
2023-11-12T05:16:17Z

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [PATCH] Test memory leak in ovl_parse_param
Author: eadavis@qq.com

please test memory leak in ovl_parse_param

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13d88ac54ddd

diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c
index ddab9ea267d1..735ae0db404a 100644
--- a/fs/overlayfs/params.c
+++ b/fs/overlayfs/params.c
@@ -530,6 +530,7 @@ static int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc)
return 0;

out_put:
+ ctr->nr = nr;
ovl_reset_lowerdirs(ctx);