]> git.baikalelectronics.ru Git - kernel.git/commit
fat: fix uninit-memory access for partial initialized inode
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fri, 6 Mar 2020 06:28:36 +0000 (22:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Mar 2020 13:06:09 +0000 (07:06 -0600)
commitd9343cf799f034f1a2c1deed6db64b27e67d79f3
tree87bc38f2bc3151bb3f53756a61904244ef1bb497
parent217b14cf613603e10155a5544898cb49eff83a39
fat: fix uninit-memory access for partial initialized inode

When get an error in the middle of reading an inode, some fields in the
inode might be still not initialized.  And then the evict_inode path may
access those fields via iput().

To fix, this makes sure that inode fields are initialized.

Reported-by: syzbot+9d82b8de2992579da5d0@syzkaller.appspotmail.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/871rqnreqx.fsf@mail.parknet.co.jp
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fat/inode.c