lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200608221101.k7MB1jm20630@apps.cwi.nl>
Date:	Tue, 22 Aug 2006 13:01:45 +0200 (MEST)
From:	<Andries.Brouwer@....nl>
To:	akpm@...l.org, torvalds@...l.org
Cc:	linux-kernel@...r.kernel.org
Subject: ext2 fix

Mounting an ext2 filesystem with zero s_inodes_per_group
will cause a divide error. Below a patch against 2.6.17.8.

Andries

diff -uprN -X /linux/dontdiff a/fs/ext2/super.c b/fs/ext2/super.c
--- a/fs/ext2/super.c	2006-08-07 16:01:12.000000000 +0200
+++ b/fs/ext2/super.c	2006-08-22 12:36:45.682620352 +0200
@@ -776,7 +776,7 @@ static int ext2_fill_super(struct super_
 	if (EXT2_INODE_SIZE(sb) == 0)
 		goto cantfind_ext2;
 	sbi->s_inodes_per_block = sb->s_blocksize / EXT2_INODE_SIZE(sb);
-	if (sbi->s_inodes_per_block == 0)
+	if (sbi->s_inodes_per_block == 0 || sbi->s_inodes_per_group == 0)
 		goto cantfind_ext2;
 	sbi->s_itb_per_group = sbi->s_inodes_per_group /
 					sbi->s_inodes_per_block;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ