[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#722696: marked as done (partman-crypto: remove broken BLKGETSIZE fallback from blockdev-wipe)



Your message dated Wed, 02 Oct 2013 06:33:25 +0000
with message-id <E1VRFzx-0006oL-6l@franck.debian.org>
and subject line Bug#722696: fixed in partman-crypto 63
has caused the Debian Bug report #722696,
regarding partman-crypto: remove broken BLKGETSIZE fallback from blockdev-wipe
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
722696: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722696
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: partman-crypto
Severity: normal
Tags: d-i patch

Hello!

blockdev-wipe uses BLKGETSIZE64 to determine the size of the device to be
wiped.  In case that fails, there currently is a fallback to BLKGETSIZE.
Please remove the fallback (patch attached) for these reasons:

a) On 32bit platforms (with 32bit "long"), the fallback code contains an
integer wraparound bug which restricts the region to be wiped to at most the
first 4GB of the device.

b) BLKGETSIZE64 exists since Linux 2.4.10, so there's really no need for a
fallback.

This bug seems to exist since 2006-04-18, i.e. it has been in Debian
installers since etch.  The kernel for etch was 2.6.18 which includes
BLKGETSIZE64, therefore I believe that the fallback was never used and thus we
don't need to worry about insufficiently wiped devices in deployed Debian
installations.  (I'd appreciate if someone could confirm this line of
argument.)

Regards,
Thiemo Nagel

-- System Information:
Debian Release: 6.0.7
  APT prefers oldstable-updates
  APT policy: (990, 'oldstable-updates'), (990, 'oldstable-proposed-updates'), (990, 'oldstable'), (450, 'proposed-updates'), (450, 'stable'), (300, 'unstable'), (150, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/blockdev-wipe/blockdev-wipe.c b/blockdev-wipe/blockdev-wipe.c
index 064ab15..dfced12 100644
--- a/blockdev-wipe/blockdev-wipe.c
+++ b/blockdev-wipe/blockdev-wipe.c
@@ -63,19 +63,14 @@ static unsigned long long dev_size(int fd)
 {
 	int ret;
 	unsigned long long size;
-	unsigned long blocks;
 
 	ret = ioctl(fd, BLKGETSIZE64, &size);
-	if (ret == 0)
-		return size;
-
-	ret = ioctl(fd, BLKGETSIZE, &blocks);
 	if (ret < 0) {
 		close(fd);
 		die("failed to get device size", 1);
 	}
 
-	return blocks * 512;
+	return size;
 }
 
 static int do_wipe(int source, int target, size_t wsize)

--- End Message ---
--- Begin Message ---
Source: partman-crypto
Source-Version: 63

We believe that the bug you reported is fixed in the latest version of
partman-crypto, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 722696@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated partman-crypto package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 02 Oct 2013 07:26:54 +0200
Source: partman-crypto
Binary: partman-crypto partman-crypto-dm
Architecture: source i386 all
Version: 63
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description: 
 partman-crypto - Add to partman support for block device encryption (udeb)
 partman-crypto-dm - Add to partman support for dm-crypt encryption (udeb)
Closes: 722696
Changes: 
 partman-crypto (63) unstable; urgency=low
 .
   [ Thiemo Nagel ]
   * remove broken BLKGETSIZE fallback from blockdev-wipe. Closes: #722696
Checksums-Sha1: 
 f0e50bdcf97a409a689478799c9ade7c26807b78 1782 partman-crypto_63.dsc
 7ec111c2e39dce65434a127036e654a87885136b 335817 partman-crypto_63.tar.gz
 89f4f15ff8b710ef3469199efc8ea1b593a24779 297786 partman-crypto_63_i386.udeb
 abe467135ba5c06631e5ce69f4b8ab9457f2e886 1322 partman-crypto-dm_63_all.udeb
Checksums-Sha256: 
 0899b857f94e5c6c62665e40083dffb40353b68c5d832f7cf5d7ec760039fe49 1782 partman-crypto_63.dsc
 c833ef5b138a90de5ac706f7463e247fba0d28fcfff5d65efd8f591cb57b7a9a 335817 partman-crypto_63.tar.gz
 b4b59148c4310e4decb9861765c5db6185a065baf529459c2836e30c35583e77 297786 partman-crypto_63_i386.udeb
 3dfba40774eb63b7b03fbe60dcd37a19de146abe1ef29464c2b4a42829ee1c23 1322 partman-crypto-dm_63_all.udeb
Files: 
 f031ff29f2d0c5708a096e71814416f1 1782 debian-installer optional partman-crypto_63.dsc
 87588dedf199a4313824a8fc073a909c 335817 debian-installer optional partman-crypto_63.tar.gz
 d86b66fbb331330752ede714104a1c31 297786 debian-installer optional partman-crypto_63_i386.udeb
 6ccc726d35819dfc5c2aba59d93d8c71 1322 debian-installer optional partman-crypto-dm_63_all.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIVAwUBUku8BYcvcCxNbiWoAQKVTxAAuobdzMz6CJfKyh/zcDsQnR+Ib4PY7JIO
HFlTyDrSNPwUhTm0/qCIUbcvaKSXAfKn4l9guDP5fof9jvJKTAh/F4e7o+VEUm0/
3I2tQ5ch2Acaa/wpdtDKQUBYxUNcDMtTIyq7w1MYIovUm/jSsIPBFZeUnn96bjoT
/UnT01kLJKK8Sih4BP/GsX4ZLSM3VzWOa2bjWsEZLZwffVTUDquGzfYbVqMGnRNl
QUC3mtvv5BrENhZwKjFFnIbXTWVyCeJbdRUsk2rdSIEJetbJqXhtTTr7/HwuV+nb
tzEnBCxEjMXgaiwIvIaAmdWBse7zTCrLejGPE6H92gGGux+Q0mirdpZPTRNkdcMl
L9f6yLriri9xYwWbC87HSqhFNTUpvxaOPcS3lfCXSgIDVGrVsCBuSBlQf3kcA0Hc
fgSIVAtOO61LAqaXihvfF1W2M6nQDGkTXWRiTkpN/CCl8ympq7QjiskKOxummZBw
3FXe9Mg6woApFPAe8Q/8Oc92gar0X/zMRrMBwY5fwPXgkZvDJ61s8oBM+O5v3Ugc
DNb24yHGkFPfGQjwCIATJjBt4t+/RTWVQPnYtaABWE+PItDksPLra3qoQc3/7cwu
B44sLKLJ2BSQOZ+px5Z5PmkwfTrTTGoFldKHO+A0LW10vaRwEW86bMMfiHuwCCeM
ElBUqnlvVf0=
=54yu
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: