android_kernel_samsung_msm8976/fs/fat
OGAWA Hirofumi 47c76efa3f fat: fix memory allocation failure handling of match_strdup()
commit 35033ab988c396ad7bce3b6d24060c16a9066db8 upstream.

In parse_options(), if match_strdup() failed, parse_options() leaves
opts->iocharset in unexpected state (i.e.  still pointing the freed
string).  And this can be the cause of double free.

To fix, this initialize opts->iocharset always when freeing.

Change-Id: Ic7e843b1b4f66cefa10e9563d8a382c29e436099
Link: http://lkml.kernel.org/r/8736wp9dzc.fsf@mail.parknet.co.jp
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reported-by: syzbot+90b8e10515ae88228a92@syzkaller.appspotmail.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-11-08 22:43:50 +01:00
..
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
cache.c fat: validate ->i_start before using 2019-07-27 21:51:37 +02:00
dir.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
fat.h fat: rcu-delay unloading nls and freeing sbi 2019-11-08 22:43:40 +01:00
fatent.c fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters() 2019-07-27 21:52:38 +02:00
file.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
inode.c fat: fix memory allocation failure handling of match_strdup() 2019-11-08 22:43:50 +01:00
misc.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
namei_msdos.c
namei_vfat.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
nfs.c
xattr.c Import latest Samsung release 2017-04-18 03:43:52 +02:00