[cygwin] DD bug fails to wipe last 48 sectors of a disk

Hashim Aziz hashaziz@hotmail.com
Tue Dec 29 00:46:14 GMT 2020

From: Cygwin <cygwin-bounces@cygwin.com> on behalf of Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Sent: 23 June 2020 8:33 PM
To: cygwin@cygwin.com <cygwin@cygwin.com>
Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk

I don't have the facilities to test, and there appear to be *NO* Windows
documentation details on error condition handling, but my suspicion is that Unix
reads and writes fail only *AFTER* reading or writing at the end of the device,
but Windows reads and writes extents may be checked and failed *BEFORE* reading
or writing any data near the end of the device.
If the actual Windows error code returned is generic, Cygwin would need to
pre-check the device size as Windows does, and reduce read and write sizes to
the allowed maximum at the end of the device.

That's very helpful, thank you. Do you know if any more work has been done to attempt to fix this bug, and whether it's likely to be fixed anytime soon? It's crazy that such a commonly used command leaves so much data unwiped unbeknown to so many users, it's a very serious security hole and the sooner it can be fixed the better.

More information about the Cygwin mailing list