Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udf: Fix races with i_size changes during readpage
__udf_adinicb_readpage() uses i_size several times. When truncate changes i_size while the function is running, it can observe several different values and thus e.g. expose uninitialized parts of page to userspace. Also use i_size_read() in the function since it does not hold inode_lock. Since i_size is guaranteed to be small, this cannot really cause any issues even on 32-bit archs but let's be careful. CC: stable@vger.kernel.org Fixes: 9c2fc0d Signed-off-by: Jan Kara <jack@suse.cz>
- Loading branch information