linux/fs/udf
Steve Magnani 56db199169 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>
2019-07-31 18:41:37 +02:00
..
balloc.c udf: prevent allocation beyond UDF partition 2019-07-31 18:41:37 +02:00
dir.c udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF 2017-10-17 11:56:45 +02:00
directory.c udf: Provide function for calculating dir entry length 2018-06-20 11:05:49 +02:00
ecma_167.h udf: use __packed instead of __attribute__ ((packed)) 2017-01-10 11:29:11 +01:00
file.c udf: Apply uid/gid mount options also to new inodes & chown 2018-02-27 10:25:33 +01:00
ialloc.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
inode.c udf: Fix incorrect final NOT_ALLOCATED (hole) extent length 2019-07-10 10:11:24 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lowlevel.c udf: atomically read inode size 2017-01-10 11:57:34 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
misc.c udf: Fix signed/unsigned format specifiers 2017-10-17 12:00:58 +02:00
namei.c udf: fix an uninitialized read bug and remove dead code 2019-04-17 13:13:24 +02:00
osta_udf.h udf: use __packed instead of __attribute__ ((packed)) 2017-01-10 11:29:11 +01:00
partition.c udf: Fix signed/unsigned format specifiers 2017-10-17 12:00:58 +02:00
super.c udf: support 2048-byte spacing of VRS descriptors on 4K media 2019-07-31 12:04:42 +02:00
symlink.c statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
truncate.c udf: Propagate errors from udf_truncate_extents() 2019-03-18 16:30:02 +01:00
udf_i.h udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
udf_sb.h udf: Drop pack pragma from udf_sb.h 2018-09-07 10:32:23 +02:00
udfdecl.h udf: Propagate errors from udf_truncate_extents() 2019-03-18 16:30:02 +01:00
udfend.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udftime.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
unicode.c udf: Allow mounting volumes with incorrect identification strings 2018-11-19 10:27:59 +01:00