Re: [syzbot] [cifs?] memory leak in smb3_fs_context_fullpath

From: Aleksandr Nogikh
Date: Tue Nov 18 2025 - 06:38:14 EST


On Tue, Nov 18, 2025 at 12:23 PM shaurya <ssranevjti@xxxxxxxxx> wrote:
>
> #syz test:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>
> diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
> index 0f894d09157b..975f1fa153fd 100644
> --- a/fs/smb/client/fs_context.c
> +++ b/fs/smb/client/fs_context.c
> @@ -1834,6 +1834,12 @@ static int smb3_fs_context_parse_param(struct
> fs_context *fc,

Please note that your email client has line-wrapped the text, thus
breaking this git patch. It may be easier to just attach it as a file,
syzbot should understand it.

> ctx->password = NULL;
> kfree_sensitive(ctx->password2);
> ctx->password2 = NULL;
> + kfree(ctx->source);
> + ctx->source = NULL;
> + if (fc) {
> + kfree(fc->source);
> + fc->source = NULL;
> + }
> return -EINVAL;
> }
>
> --
> 2.34.1
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion visit https://groups.google.com/d/msgid/syzkaller-bugs/8831475d-0eeb-4107-ad87-c9c8736c219c%40gmail.com.