mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
d141e72aef
In exfat, not only the newly allocated space will be mapped as the new buffer, but also the space between ->valid_size and the file size will be mapped as the new buffer. If the buffer is mapped as new in ->write_begin(), it will be zeroed. But if the buffer has been mapped as new before ->write_begin(), ->write_begin() will not zero them, resulting in access to uninitialized data. So this commit uses folio_zero_new_buffers() to zero the new buffers after ->write_begin(). Fixes: 6630ea49103c ("exfat: move extend valid_size into ->page_mkwrite()") Reported-by: syzbot+91ae49e1c1a2634d20c0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=91ae49e1c1a2634d20c0 Tested-by: syzbot+91ae49e1c1a2634d20c0@syzkaller.appspotmail.com Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>