Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 6630ea49103c ("exfat: move extend valid_size into ->page_mkwrite()") Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=91ae49e1c1a2634d20c0 Tested-by: [email protected] Signed-off-by: Yuezhang Mo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
- Loading branch information