linux-next/fs/exfat
Yuezhang Mo d141e72aef exfat: fix the new buffer was not zeroed before writing
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: 6630ea4910 ("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>
2024-12-17 20:22:08 +09:00
..
balloc.c exfat: fix memory leak in exfat_load_bitmap() 2024-09-18 07:40:58 +09:00
cache.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dir.c exfat: fix the infinite loop in exfat_readdir() 2024-12-17 20:22:05 +09:00
exfat_fs.h exfat: reduce FAT chain traversal 2024-11-25 17:08:27 +09:00
exfat_raw.h exfat: add ioctls for accessing attributes 2023-10-31 10:00:51 +09:00
fatent.c exfat: fix the infinite loop in __exfat_free_cluster() 2024-12-17 20:22:02 +09:00
file.c exfat: fix the new buffer was not zeroed before writing 2024-12-17 20:22:08 +09:00
inode.c exfat: add exfat_get_dentry_set_by_ei() helper 2024-11-25 17:08:23 +09:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile exfat: add Kconfig and Makefile 2020-03-05 21:00:40 -05:00
misc.c exfat: convert to new timestamp accessors 2023-10-18 13:26:21 +02:00
namei.c exfat: fix exfat_find_empty_entry() not returning error on failure 2024-12-17 20:21:59 +09:00
nls.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
super.c exfat: Implement sops->shutdown and ioctl 2024-09-18 07:40:56 +09:00