X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D9E638618D4
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1596580978;
	bh=XfryChl6867iwQLSj+whOQBFuLbydNKo5D+ZmVIehRk=;
	h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=gFdxqBK6oRo2HAaBQtewipgP9zoOpW2AIk9/d4lghLz0BbUAx8YuZwm7mflfhcGDb
	 YhAQzgfj8K0NHaYTOQSoAHr+i4tpGy+Twtki3ZDY3yMInFVdF7fb4gvHZEMU3ljngQ
	 8+9O8JhdzicKFFY8IfVnLVg1+qQgAbBQS0JFEMQM=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E01193857C40
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=iji5qELhKNK3oFGDLFjNCl8GQJqsWsPkW2AS+c389L4836SJFmaEGWok2KrvGwmXfdawIW2DE1C37WZ5Qyn2AeUTkEu+jDMU0dHIWSjImg2M+uuW1L9cnvaFp7ohUyAHioG3Ue3O5F+vn5EX5CtAQWSqVr3qAoN7mcUPwc8vMSoqGUSxcB9pqFHVI1m1VrdHRBFNj1IHZ7+rL4RkN42glBadWSNNFdzh3nB7OaNCN13qOidD4DLfDTiPtsBURJw5OrenhLyfwgg//2mhFK43lV36LcQpiKEQTCxJGGf8PqplJpk72G5emzfz55l6wFrTuPG6QzDZC9WYnTbOnHBbaA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=k7MU79W/gBmhk1hjC8w7l9UAasjVZVyeB+r0KX4bdMA=;
 b=igoqK82qh9yqgeSgFrJnA3V1nQ26tNZVQPbHi7SQVsMnYT6sOzjXu5Pq6W7zxvaOblWt1R4q1VASTtuonlhnVoLeyE2BHMrriE4kOGjK7EXJNO83ebFErfSON63o4r7MOjkjLUiUJNJbMgpsdX7QxC3R8YmsY8ozhdC43poolJGKUB8P4AI8a2qfIJeBOz6OEQIv0MN1Ruu77ikeb7WaYiEQm8IwBEHFE0rDNbJUXj95zjKNhvBU9fyJDogJBnzoe0yejYLAueaxs1EQGIKIaCMKufnjzNrDmdJafs9IQYzPk3uzaAYUlSRoiuOq7710R7e1Pq16XwSoxgjC9itHCA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
To: cygwin <cygwin@cygwin.com>
Subject: Re: DD bug fails to wipe last 48 sectors of a disk
Thread-Topic: DD bug fails to wipe last 48 sectors of a disk
Thread-Index: AQHWRlgtCZZ0g6noFEKBC6QD7s7xqKko06+p
Date: Tue, 4 Aug 2020 22:42:54 +0000
Message-ID: <DB7PR01MB5193B9A34EC8795BE7945F92D54A0@DB7PR01MB5193.eurprd01.prod.exchangelabs.com>
References: <DB7PR01MB5193A18F1D947ED4C276CD25D5980@DB7PR01MB5193.eurprd01.prod.exchangelabs.com>
In-Reply-To: <DB7PR01MB5193A18F1D947ED4C276CD25D5980@DB7PR01MB5193.eurprd01.prod.exchangelabs.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-incomingtopheadermarker: OriginalChecksum:69CA7B23A917A79566CEACA6BACF8FDB7CFC9961FE5DDB2AB61119F6CEBE7B13;
 UpperCasedChecksum:9F4871F95DAF7A1BBE4E882D013AD496169321D2C8A3156A8C64CCA3709177AA;
 SizeAsReceived:6907; Count:44
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [tEXL4945I3xmTbep+HMkPoUhcIJA+3SL]
x-ms-publictraffictype: Email
x-incomingheadercount: 44
x-eopattributedmessage: 0
x-ms-office365-filtering-correlation-id: 4af2ac3b-5fbf-4551-072e-08d838c7b9f6
x-ms-traffictypediagnostic: VI1EUR05HT165:
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: y3pC+4+JhgVmf/rOw++6migeHz2HG9Ss4jyTnQ6AkxVaBERx+KRGTDpc8fywPZrEjjCDkGY7Qqf4pzpLO3jQjgVXk9AOnJ5C71dfF8vyVIbsXm7M90gkZ1YqWat/TPPMIoxKoRZ3vgpndXqUbEa6oxzbxK0cQOoIQyp+CtaIZxw9jdlaGtefvwWzhCTOiwAzs5uzHBkJ7BQqHdabWEUS3ajfAfzakviRalCg69ptvhTKyVGvOJZlaEcxF3mnmWvN
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:;
 IPV:NLI; SFV:NSPM; H:DB7PR01MB5193.eurprd01.prod.exchangelabs.com; PTR:;
 CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; 
x-ms-exchange-antispam-messagedata: CRD4xoQAWnUgQ/hWg/eDfXpO5lIdMkVkku0HLnUjbi3AqpShWcP5pb2Gc5LWz1FnRT15eAUHdrggLOL2C23iJe7H38Z9QpYaMjZ6ofSuu73Gwfjj5ZeNx5g3xMhtn4pgUFaiL3C9PfkyZV8Jh2PXaQ==
x-ms-exchange-transport-forked: True
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-AuthSource: VI1EUR05FT027.eop-eur05.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 4af2ac3b-5fbf-4551-072e-08d838c7b9f6
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2020 22:42:54.1931 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT165
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_20, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
 TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Hashim Aziz via Cygwin <cygwin@cygwin.com>
Reply-To: Hashim Aziz <hashaziz@hotmail.com>
Content-Type: text/plain; charset="windows-1252"
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 074MhNPU007419


________________________________
From: Hashim Aziz <hashaziz@hotmail.com>
Sent: 19 June 2020 7:19 PM
To: cygwin <cygwin@cygwin.com>
Subject: DD bug fails to wipe last 48 sectors of a disk


I first came across this bug last year, and wrote up my findings in a detailed answer to the StackExchange network:



https://superuser.com/questions/1505715/why-does-dd-give-me-an-error-at-the-end-of-zero-writing-a-disk



I didn’t then have the time to report it to this mailing list, but have just tested it using the latest version of Cygwin on the same two disks as I did then, and can confirm that the problem still persists. It’s also of note that I was running Windows 7 back then and am currently running 10, so this is now confirmed to manifest on both of the last two Windows OSes. I’m happy to work with the team to get this fixed, as I frequently need to make use of Cygwin dd to zero out drives for both security and regulatory compliance reasons, and failing to wipe the last 48 sectors of all drives is a pretty significant security risk.



Thanks,

Hashim



---


Apologies for the late reply, I've just finished going through the responses. While the code solutions given are useful and very interesting, they seem to be largely hacks and workarounds. As someone who wipes many drives for security purposes, from a security point of view it's a huge problem for dd to be silently and consistently failing to wipe the last sector of a drive, and 64KB is still plenty of space to contain sensitive documents. Is it planned for this to be fixed at some point?
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

