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: <1259422233-14024-3-git-send-email-tytso@mit.edu>
Date:	Sat, 28 Nov 2009 10:30:33 -0500
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>,
	Theodore Ts'o <tytso@....edu>
Subject: [PATCH 3/3] filefrag: Fix a core dump on sparc32 platforms with 8k file systems

On 32-bit platforms where the file system block size is 8k or greater,
the calculation bpib*bpib*bpib* will overflow a 32-bit calculation,
leading to a divide by zero error.  Fix this.

Thanks to Mikulas Patocka for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
 misc/filefrag.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/misc/filefrag.c b/misc/filefrag.c
index 11783fd..1611f90 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -341,7 +341,7 @@ static void frag_report(const char *filename)
 				if (((i-EXT2_DIRECT-bpib) % (bpib*bpib)) == 0)
 					last_block++;
 				if (((i-EXT2_DIRECT-bpib-bpib*bpib) %
-							(bpib*bpib*bpib)) == 0)
+				     (((__u64) bpib)*bpib*bpib)) == 0)
 					last_block++;
 			}
 			rc = get_bmap(fd, i, &block);
-- 
1.6.5.216.g5288a.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ