Hi, I've found that sbi->s_es->s_reserved_gdt_blocks is not validated before being used, so e.g. a value of 25600 will overflow the buffer head and corrupt random kernel memory (I've observed 20+ different stack traces due to this bug! many of them long after the code has finished). The following patch fixes it for me: diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 3020fd7..1ea5054 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -208,6 +208,9 @@ static int ext4_init_block_bitmap(struct super_block *sb, memset(bh->b_data, 0, sb->s_blocksize); bit_max = ext4_num_base_meta_clusters(sb, block_group); + if ((bit_max >> 3) >= bh->b_size) + return -EFSCORRUPTED; + for (bit = 0; bit < bit_max; bit++) ext4_set_bit(bit, bh->b_data); However, I think there are potentially more bugs later in this function where offsets are not validated so it needs to be reviewed carefully. Another question is whether we should do the validation earlier, e.g. in ext4_fill_super(). I'm not too familiar with the code, but maybe something like the attached patch would be better? It does seem to fix the issue as well. Vegard