summaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorSteve Magnani <steve.magnani@digidescorp.com>2019-07-28 14:19:12 -0500
committerJan Kara <jack@suse.cz>2019-07-31 18:41:37 +0200
commit56db1991690f076c2a7e3b2a226629cd10901690 (patch)
treed230956edc1a1a9d6c8a53c9d35d7fdd63343d2d /fs/udf/inode.c
parent4b8e1106dd95d4d7f2781258d3871b445f3928ce (diff)
downloadlinux-56db1991690f076c2a7e3b2a226629cd10901690.tar.gz
linux-56db1991690f076c2a7e3b2a226629cd10901690.tar.bz2
linux-56db1991690f076c2a7e3b2a226629cd10901690.zip
udf: prevent allocation beyond UDF partition
The UDF bitmap allocation code assumes that a recorded Unallocated Space Bitmap is compliant with ECMA-167 4/13, which requires that pad bytes between the end of the bitmap and the end of a logical block are all zero. When a recorded bitmap does not comply with this requirement, for example one padded with FF to the block boundary instead of 00, the allocator may "allocate" blocks that are outside the UDF partition extent. This can result in UDF volume descriptors being overwritten by file data or by partition-level descriptors, and in extreme cases, even in scribbling on a subsequent disk partition. Add a check that the block selected by the allocator actually resides within the UDF partition extent. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Link: https://lore.kernel.org/r/1564341552-129750-1-git-send-email-steve@digidescorp.com Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/inode.c')
0 files changed, 0 insertions, 0 deletions