From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071063.outbound.protection.outlook.com [40.92.71.63]) by sourceware.org (Postfix) with ESMTPS id B5630394841C for ; Tue, 23 Jun 2020 19:46:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B5630394841C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fG9r5+ujOpPUToYU+ZdbC+B84a7o2FAPgqQYfAY6++eJLIFiNy+iebRim1RdkUKcBxUKUvP4hoTrVucy2YXTuJSfA591kF0JQPHbS6KlOnC6aqU+2irHxsif300ldhupLjyTsqD+OF+TJOi9UQu6fgAAo4dRyxYdFtwX6N7Jon2z/nJ1NoAaW1JZzpesKTNobhAnShSI+abwZBbixGtGSbSFR5/Gf7zNcqTB6o+KV9buBdbfPzRgeARs5kg94SKf6WdToSg04CDYNosi1BGj9sJA9844gHDaN2P04Zucv1sm/r9eGWHsioaNccWuL/N9ZnTI8dxtcKztSOsHzvD7Vw== 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=oSdSyxWXY+m8FIZMxFsNjq/iVn7MxPmGy62op89oTtQ=; b=kUkp9FaUZvpwWh+LP9t96PQAUfXZvrB0TZg0f3rultMxaRusOT/GMIpk8wEF7aKGk7RBbAjHZkRxpB6E+MEJA75HLeDpsD9hpeXp667nefFPgyrbwFGbbQCHBDy1eyx3JOU7HgrRcrTKWbh/a+58+xZX2FAsQGaCVNZ8TpEVx1Ge8lniMDhxG+G415TuyUXQWm04wFWbVp4sIg7gQ72nFwBX9LEq9lyBE+oPqWWdHgG8VJ1Nwb0CkGQx1X4tkLqKzWMCatuVyVdBgt+Q7WZLVxgI1N2+sIduyHlqlpweqtwjZJYZhEwZ43guZyxddhAZEvtfp22/8SlDVnlxAbcrkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e08::53) by AM5EUR03HT088.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e08::410) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 19:46:44 +0000 Received: from DB7PR01MB5193.eurprd01.prod.exchangelabs.com (2a01:111:e400:7e08::52) by AM5EUR03FT007.mail.protection.outlook.com (2a01:111:e400:7e08::145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 19:46:44 +0000 Received: from DB7PR01MB5193.eurprd01.prod.exchangelabs.com ([fe80::3db9:cc82:511b:b8fb]) by DB7PR01MB5193.eurprd01.prod.exchangelabs.com ([fe80::3db9:cc82:511b:b8fb%2]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 19:46:44 +0000 From: Hashim Aziz 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: AQHWRlgtCZZ0g6noFEKBC6QD7s7xqKjgYswAgAAb2ayAAXbVgIAEYnXDgAAL3YCAADzJEA== Date: Tue, 23 Jun 2020 19:46:44 +0000 Message-ID: References: <1d1801d64677$bea56050$3bf020f0$@pdinc.us> <60bf1507-4edb-a03f-ec14-07e1ab7f0d94@cs.umass.edu> , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:DE9AEB2F8B4042121A9CC725F852FD4BCB9343FCA006045E36DBA8F2A32C536E; UpperCasedChecksum:D989805699F27D6A6918717569365D59FF970A746E6DE8DA7CB31FF4830E460D; SizeAsReceived:7301; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [yM78XtCs7fC1a6Uup9tBrj+Ds+bQCK6r] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: d89cd335-9115-47ce-79fe-08d817ae287e x-ms-traffictypediagnostic: AM5EUR03HT088: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cCYno46E9ZxyccCciP+6VE2GLKYnswVnFHWgQILqTTrMDuF/Y5mtJEO5jo8NEogCoxpIepZTuQ/H3MIpQG0Twmd2ShnWwOfv4LyhlOHx1ezeebuPfVSKx35ZKFXz8HGJS+iBEYliKzMPzC7nOtm52R01c4sM8q7Ipz18weTZOpcnEAql51vqZUciS82prEWJTi1qSGpEJZWBJIonRr4fDbE44dcMIM+/7SCo4D9EaCCsaKtU8I7BizOHE7dZGZUz 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: YHPaToYnu/uUyYKWMXfoRc07QYIOOpPMAEqUzh30wCf0GMpJrn6TPp4EwcndsbHztoxn9bkpNTqd+Ll800awf5fC8jQfLRVeYOvWPyHlf/v3oKjkfqbQ2qtQiipU4NTb9zrGTuVwpufZngzA2JdWoQ== 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: d89cd335-9115-47ce-79fe-08d817ae287e X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2020 19:46:44.2861 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT088 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 19:46:48 -0000 I've just tested with the command: dd if=3D/dev/zero of=3D/dev/sda iflag=3Dfullblock bs=3D4M status=3Dprogress ...and can confirm that the last 48 sectors remain unwiped in this case als= o. Here is the output: 1000182120448 bytes (1.0 TB, 931 GiB) copied, 8284 s, 121 MB/s dd: error writing '/dev/sda': No space left on device 238468+0 records in 238467+0 records out 1000204861440 bytes (1.0 TB, 932 GiB) copied, 8284.89 s, 121 MB/s ________________________________ From: Cygwin on behalf of Nicholas Clark via Cy= gwin Sent: 23 June 2020 5:06 PM To: cygwin Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk Do you get the same behavior when you run dd with iflag=3Dfullblock? Withou= t that flag, it's possible dd's input to read a smaller block than requested (which would correspond with a smaller write to the output). On Tue, Jun 23, 2020 at 9:28 AM Hashim Aziz via Cygwin wrote: > 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=3D= 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 < > moss@cs.umass.edu> > 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=3D/dev/zero of=3D/dev/sdX bs=3D4M status=3Dprogress > > > > 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=3D/dev/zero of=3D\\.\PHYSICALDRIVEX --progress bs=3D4M > > > > ...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 > -- 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