Commit 9201cd79 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Reject NILFS2 superblocks with over 1GiB blocks.

	* grub-core/fs/nilfs2.c (grub_nilfs2_valid_sb): Check that
	block size is <= 1GiB.
parent f27ccb58
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
Reject NILFS2 superblocks with over 1GiB blocks.
* grub-core/fs/nilfs2.c (grub_nilfs2_valid_sb): Check that
block size is <= 1GiB.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com> 2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
   
* grub-core/disk/ata.c (grub_ata_setaddress): Check that geometry * grub-core/disk/ata.c (grub_ata_setaddress): Check that geometry
...@@ -724,6 +724,10 @@ grub_nilfs2_valid_sb (struct grub_nilfs2_super_block *sbp) ...@@ -724,6 +724,10 @@ grub_nilfs2_valid_sb (struct grub_nilfs2_super_block *sbp)
if (grub_le_to_cpu32 (sbp->s_rev_level) != NILFS_SUPORT_REV) if (grub_le_to_cpu32 (sbp->s_rev_level) != NILFS_SUPORT_REV)
return 0; return 0;
/* 20 already means 1GiB blocks. We don't want to deal with blocks overflowing int32. */
if (grub_le_to_cpu32 (sbp->s_log_block_size) > 20)
return 0;
return 1; return 1;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment