[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190522194733.GA4766@nautica>
Date: Wed, 22 May 2019 21:47:33 +0200
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Bharath Vedartham <linux.bhar@...il.com>
Cc: ericvh@...il.com, lucho@...kov.net, linux-kernel@...r.kernel.org,
v9fs-developer@...ts.sourceforge.net
Subject: Re: [PATCH v2] 9p/cache.c: Fix memory leak in
v9fs_cache_session_get_cookie
Bharath Vedartham wrote on Thu, May 23, 2019:
> v9fs_cache_session_get_cookie assigns a random cachetag to v9ses->cachetag,
> if the cachetag is not assigned previously.
>
> v9fs_random_cachetag allocates memory to v9ses->cachetag with kmalloc and uses
> scnprintf to fill it up with a cachetag.
>
> But if scnprintf fails, v9ses->cachetag is not freed in the current
> code causing a memory leak.
>
> Fix this by freeing v9ses->cachetag it v9fs_random_cachetag fails.
>
> This was reported by syzbot, the link to the report is below:
> https://syzkaller.appspot.com/bug?id=f012bdf297a7a4c860c38a88b44fbee43fd9bbf3
>
> Reported-by: syzbot+3a030a73b6c1e9833815@...kaller.appspotmail.com
> Signed-off-by: Bharath Vedartham <linux.bhar@...il.com>
Thanks!
I'm on limited internet right now but will run tests and queue this up tomorrow
--
Dominique
Powered by blists - more mailing lists