diff options
author | Eric Sandeen <sandeen@redhat.com> | 2018-08-16 21:44:02 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-08-21 11:37:41 +0200 |
commit | 09a4e0be5826aa66c4ce9954841f110ffe63ef4f (patch) | |
tree | 9d4b485a463591aaa53757d5076c3f4ac2bb2950 /fs/quota | |
parent | d3bc0fa8411c35194f99046157e2e26fe60e1d91 (diff) |
isofs: reject hardware sector size > 2048 bytes
The largest block size supported by isofs is ISOFS_BLOCK_SIZE (2048), but
isofs_fill_super calls sb_min_blocksize and sets the blocksize to the
device's logical block size if it's larger than what we ended up with after
option parsing.
If for some reason we try to mount a hard 4k device as an isofs filesystem,
we'll set opt.blocksize to 4096, and when we try to read the superblock
we found via:
block = iso_blknum << (ISOFS_BLOCK_BITS - s->s_blocksize_bits)
with s_blocksize_bits greater than ISOFS_BLOCK_BITS, we'll have a negative
shift and the bread will fail somewhat cryptically:
isofs_fill_super: bread failed, dev=sda, iso_blknum=17, block=-2147483648
It seems best to just catch and clearly reject mounts of such a device.
Reported-by: Bryan Gurney <bgurney@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
0 files changed, 0 insertions, 0 deletions