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

From: syzbot
Date: Sun Nov 12 2023 - 00:16:25 EST


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

***

Subject: [PATCH] Test memory leak in ovl_parse_param
Author: eadavis@xxxxxx

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);

out_err: