X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58C1238930D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1592674280; bh=B4tSroOKKPRflpOp2ooUQmdEsub60sQMcu/21+IqplU=; 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=H6Zb1sbchRetkHKNV5V1yD/Trf+tt7XJv7Mnvg+ur0pYAN8CW0/hZRG+MzZcpvIAK jq/UoMP2BAONSWlSNC0fsJKx1e1Q3HThA9shJaxLYxtjDpjUMtMmIhfhPzn8anV48k Ml2fv4B2Q6FWq4JV6SRBtpDCf4w1ZC+SxCvgJaRs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 25A3238708F9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tynho6b0RICp7243NdtEpoY9n9oheGCVZBsF6dz9B4nXPAOt2owzxzf1ib7+6UzlrbYc3H2w/SrEHpJPM5p4+MbZ36d1t5pYqKvObO+joNrY/kfcN8StLgEH9U6qqN0hHONz16Hf2b+P6xcvk20OMJRo0GE7vgbZhkgQ0SgbBzYSaIyUpcYo7IM93udp1YCk5mmUsYoCmslh730zXK7PiBikg+sQ04b2OCxJporb5RBvOD6O5I6sSG7XJHoapOJg8x3/l0TFFEOmO7SvHENOBJBKbHgQSrdArzl8lztGsqwpQNRYg2cZGljraIKVbYraHpQ01ksCuXGEGbV9CL0new== 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=S3DOHxg4re7wREp5OhZa18+WY1yCJJvXwuxABzDCiQM=; b=hbe5brwJrMJCECs8kHNPYJzFNNFY9a+LgE5eQTKLSbfq+KhlUCz1ZfrhDmVhwL8gPu5wg/eik8yE+iIj+o2MODu9MtfCru0Wp2+WHzpX2f3g6tocyLhxNHbBujPmyZ/HsdkofDVdEVNvvS4dFXfoqhXgHnVRLz7bMJahRwFr4rX5QYvVePEy9SyS4a6JGLalTR582Nyl2sT5E7uyGDlut6P/tOB+xqs9u7PouifKxDyG7Tlf4B3f9OnXYfT5IJQ2fTRjPRJnG7r13oLXd+yLJyrrPP+w7tWbqYGEP+YSISdsgPl9U/4Y9ZSRm+VHMI5qBplT0kjayfZJmbgnSBLGVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none To: The Cygwin Mailing List Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk Thread-Topic: [cygwin] DD bug fails to wipe last 48 sectors of a disk Thread-Index: AQHWRlgtCZZ0g6noFEKBC6QD7s7xqKjgYswAgAAb2aw= Date: Sat, 20 Jun 2020 17:31:15 +0000 Message-ID: References: , <1d1801d64677$bea56050$3bf020f0$@pdinc.us> In-Reply-To: <1d1801d64677$bea56050$3bf020f0$@pdinc.us> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:6E50F1A88129E81DB1FB062EBB59CC0EFA7DDC2213A5618BD208A81A406668D1; UpperCasedChecksum:4E0B4B267FF4FF1AA5B8934F8D1BA99CEBD63FCBB528937E6AFD30A1E6AED910; SizeAsReceived:6965; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [PXo+GxRBGb6HvmKyrhrLpdXaO9NiWWth] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 296f9d06-bb71-41df-a858-08d8153fbc0c x-ms-traffictypediagnostic: VI1EUR05HT073: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: b8UYniFXdkcgY2mffIpRYLcB/KibsY0yjD2gNPqb3pPkUHE9ijFkJKOkQJc2Ux4MHWocULLgYOOi9WKHUK0zMtaFmYoF7zWZtRNvxitYwP+KGS958kabAL/gCJcDvSqwUF6nPIhh5nR4g5E2lc/2d81PwBJj7iGPHfONe4lpH7WYMdW2111o4LpjF3sqH0jPTOICitl7qAUOEHmTUPCw677pWc+oONRuT8hooc0kNYHtMBSBN6g6gLhaNgnNlslG 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: N/8XNsEUMc+ERLYi3tliV5V3Ivdzfn0WVdNBJIcHEbX03b4MgcIvfXKGN9gDXY6MEF5UE6wU/MptKMYpYefy2OpsqicB9D5X9savlVB7bDfjeQ6k5lVhUimnPSphCj4HMNEZIdlROn2IkFTynj3AUw== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 296f9d06-bb71-41df-a858-08d8153fbc0c X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2020 17:31:15.3764 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT073 X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_40, 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 AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Hashim Aziz via Cygwin Reply-To: Hashim Aziz Content-Type: text/plain; charset="windows-1252" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 05KHVlj1028608 To reproduce simply run the following command on a drive (obviously, this will irreversibly wipe all data): dd if=/dev/zero of=/dev/sdX bs=4M status=progress Both drives were attached via internal SATA (by way of a PCIE to SATA Host Bus Adapter). Cygwin was running in an elevated window as dd cannot run in Cygwin without administrator access, at least not on Windows 10 and not when dealing with raw disks. I was running Avast the first time I discovered this, and am currently running Windows Defender, so doubt that the AV is the cause of this. The hard drives are a Western Digital WD10PURX-64E5EY0 (Serial: WD-WCC4J6HX189U) and a Kingston SV200S3128G (Serial: 12BA315PKAWK). I just ran DD for Windows 0.6beta3 with variations of the following command: dd.exe if=/dev/zero of=\\.\PHYSICALDRIVEX --progress bs=4M ...and can confirm that the bug also manifests here, but in a slightly different way - irrespective of the disk or block size, it fails to wipe the last 176 sectors of the drive. Hashim ________________________________ From: Jason Pyeron Sent: 19 June 2020 9:25 PM To: 'Hashim Aziz' Subject: RE: [cygwin] DD bug fails to wipe last 48 sectors of a disk > -----Original Message----- > From: Hashim Aziz via Cygwin > Sent: Friday, June 19, 2020 2:19 PM > > 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. Hmm, never had that issue. Steps to reproduce please. Running as Admin? Antivirus? How is the drive attached (USB, SATA, other)? What are the drive models (is there a known firmware issue on windows)? Does the non-cygwin http://www.chrysocome.net/dd work? -Jason -- 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