X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 288F3395CC9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1592926119; bh=yYmJ3x6s/pvbxzOxQl7sG7GMXE13OIAaSgWe7OTzpIA=; 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=YKHgVuHH6o23Mu6Ix2VulHNV9Ye+RrGf88mLECEI1TTHSeGOTJLDaUvoqzajuoCbh 1aMQnygEoehxNg3XwI4XAWng4fA9pOU0UrQT06mmMGxvMZGt+NS+eSCZcG0D1J2S+D /6XsbVQlDFOw8oi66aJUThi3g5FPI6nNc0VyyWP8= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D397D393C8B3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BNW7yPYtPuzdIouSngNTGWqeuPTaLEzqa1z19SB0KZ+jiiuM0EmRwMrfFL4dFpkV1wQyxAxF6kFskDKdji9eOIFZcIjGfQYXJJoQgvahSzf+m3aonU6//hBpd8Ym5IVhQITyfyIcZmGun1tzPcfgiy27h5qXGV6qETVzP9iqtntf+Zd1eE/eD6a1p16GyWyItCpjMuNJF9vYrKBUyxX15ahtJlOwc8CbwRaHnMp2TbPP1xCSgHC7jTwRgFqazIGC3E6V/hNuXqIfd2ASRmEgV2guLpYdKbWnLeyhrEWEhbXMSn80sGtRDueohPJf/ytHV+8e/5fvPX/bmtQjz5MyeQ== 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=iM5u76A8ju7k/yXJvgBSq1lUj9hYx27HfSpykMbiRPk=; b=RCYz8k6hAkGns7ph7bArOjqHejknDPRggPL0mzYQeN1yTdYrYgSR53FB7LiPrm1yo3RacIP2N3PcF1wFZwkqXY3md7lLhRWgTBOGC66PiIlj9Gyv7CFuSz7uSbYwb0L7EtRAxjFuG+HF6g9i8SV/fuTmRcTVgB0SC80vyguNYF7AJL3gsn8xrdTxvZOVn1OJ4TvJEsi5YH4cr5TmeKu4RAJ1f/H2HVpQqsONOjh4H49X+lL1szJtgP1VHn4mZY6YA8rN1YksIbCBsYLOpfr1Ig48Oo4h4u6DauzrfXZ4DqmP9R+9Gq3g/20pqpIz2XXQdD/XjzxdQEcgF3IMJuIyWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none To: cygwin 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: AQHWRlgtCZZ0g6noFEKBC6QD7s7xqKjgYswAgAAb2ayAAXbVgIAEYnXD Date: Tue, 23 Jun 2020 15:28:31 +0000 Message-ID: References: <1d1801d64677$bea56050$3bf020f0$@pdinc.us> , <60bf1507-4edb-a03f-ec14-07e1ab7f0d94 AT cs DOT umass DOT edu> In-Reply-To: <60bf1507-4edb-a03f-ec14-07e1ab7f0d94@cs.umass.edu> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:B07595AC2068CD7598B822D046F97F7F4B3CF5959D3AF64E09868D21B02C78BB; UpperCasedChecksum:A1FCDA2FB422844873D1DC8E9E99F000FEB57A0FDB629472C0D1D2D47A5163FB; SizeAsReceived:7104; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [QNR1+SoEodhzWcNTajrN9aZQ6mGjGSB6] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 80c2f3e5-0b3a-4062-d726-08d8178a1614 x-ms-traffictypediagnostic: VE1EUR02HT105: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UTydhfY3+h/V/WXIorsl6C2Y15e8w/h+wKzruMQ3uhggPOgQj9nYza9w6ybDEUO4DBTgSri59xcoCAHr9oo5vflpySm4t14ea+r9jFAFOSOgL1Q0r09iJ2iD6taOGEgyAik35HpG1Qk/QYVvz2+nPQ1CFNoq79j/OAiVesKAZb0pr8Np3iv18xZ6LfakjnJ2HX2aBe6doVRzJQx5A2y80/3nn/kzxMjBjl5T7Ut8myopnCjCV5j/Qfq8ph4jtTno 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: JLJcnEHB7R8I+dV6JCte9sIbJLcSahywKDgJykp/iUgyyiNuwI2rBgyG6Nwh9NaLmKVN1BFngpE46xhoovHDAnHPZm9YzdyQKev018tkkRcZUKQ90pVgCCIVAt0C2bwIZMuU30+C2v/CxBzmHan/cg== 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: 80c2f3e5-0b3a-4062-d726-08d8178a1614 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2020 15:28:31.5246 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT105 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" I hadn't checked with 512 byte block sizes because of the amount of time it would have taken, but sure enough have just finished trying with bs=512 and no block size at all (so dd's default block size, which is either 512 or 1024) and although each wipe took over 24 hours, they did indeed wipe all of the sectors. So it seems that there's a bug with regards to how Cygwin handles the last block when a large (i.e. sane) block size is selected, and that this bug doesn't occur on actual UNIX-based systems. ________________________________ From: Cygwin on behalf of Eliot Moss Sent: 20 June 2020 9:26 PM To: The Cygwin Mailing List Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk On 6/20/2020 1:31 PM, Hashim Aziz via Cygwin wrote: > 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. I was going to ask: even with block size 512 bytes? But I guess you checked that ... Regards - Eliot -- 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 -- 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