[PATCH 5.7 117/163] exfat: fix memory leak in exfat_parse_param()

2020-06-16 Thread Greg Kroah-Hartman
From: Al Viro commit f341a7d8dcc4e3d01544d7bc145633f062ef6249 upstream. butt3rflyh4ck reported memory leak found by syzkaller. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm "syz-executor.2", pid 16298, jiffies 4295172466

Re: [PATCH v2] exfat: fix memory leak in exfat_parse_param()

2020-06-03 Thread Markus Elfring
> Additionally, there's no point copying param->string in > exfat_parse_param() - just steal it, leaving NULL in param->string. > That's independent from the leak or fix thereof - it's simply > avoiding an extra copy. I find it clearer to provide such a source code adjustment by a separate update

RE: [PATCH] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
> On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote: > > > exfat_free() should call exfat_free_iocharset() after stealing > > param->string instead of kstrdup in exfat_parse_param(). > > ITYM > extfat_free() should call exfat_free_iocharset(), to prevent a leak in > case we fail

[PATCH v2] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
From: Al Viro butt3rflyh4ck reported memory leak found by syzkaller. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s) hex dump (first 8 bytes): 6b 6f 69 38

Re: [PATCH] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Al Viro
On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote: > exfat_free() should call exfat_free_iocharset() after stealing > param->string instead of kstrdup in exfat_parse_param(). ITYM extfat_free() should call exfat_free_iocharset(), to prevent a leak in case we fail after parsing

[PATCH] exfat: fix memory leak in exfat_parse_param()

2020-06-02 Thread Namjae Jeon
From: Al Viro butt3rflyh4ck reported memory leak found by syzkaller. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s) hex dump (first 8 bytes): 6b 6f 69 38

RE: memory leak in exfat_parse_param

2020-06-02 Thread Namjae Jeon
> On Tue, Jun 02, 2020 at 01:03:05PM +0800, butt3rflyh4ck wrote: > > I report a bug (in linux-5.7.0-rc7) found by syzkaller. > > > > kernel config: > > https://protect2.fireeye.com/url?k=f3a88a7d-ae6446d8-f3a90132-0cc47a30 > > d446-6021a2fbdd1681a8=1=https%3A%2F%2Fgithub.com%2Fbutterflyhack%2 > >

Re: memory leak in exfat_parse_param

2020-06-02 Thread Al Viro
On Tue, Jun 02, 2020 at 01:03:05PM +0800, butt3rflyh4ck wrote: > I report a bug (in linux-5.7.0-rc7) found by syzkaller. > > kernel config: > https://github.com/butterflyhack/syzkaller-fuzz/blob/master/config-v5.7.0-rc7 > > and can reproduce. > > A param->string held by exfat_mount_options.

memory leak in exfat_parse_param

2020-06-01 Thread butt3rflyh4ck
I report a bug (in linux-5.7.0-rc7) found by syzkaller. kernel config: https://github.com/butterflyhack/syzkaller-fuzz/blob/master/config-v5.7.0-rc7 and can reproduce. A param->string held by exfat_mount_options. BUG: memory leak unreferenced object 0x88801972e090 (size 8): comm