Bug 1151036

Summary: x86_64 nwipe overwrites with half prng data and half zeroes
Product: [Fedora] Fedora EPEL Reporter: Richard Ryder <richard.ryder>
Component: nwipeAssignee: Michal Ambroz <rebus>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: el6CC: rebus
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nwipe-0.17-3.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-03 18:43:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Incorrect pattern on disk after wipe
none
results of wipe using i686 build none

Description Richard Ryder 2014-10-09 13:06:33 UTC
Created attachment 945307 [details]
Incorrect pattern on disk after wipe

Description of problem:

After wiping a disk nwipe-0.14-2.el6.x86_64.rpm, the disk is wiped with alternating patterns of pseudo-random data and zeroes, not all pseudo-random data as expected. The i686 build overwrites with all PRNG data as expected.

Version-Release number of selected component (if applicable):
nwipe-0.14-2.el6.x86_64.rpm  (again, the i686 build works as expected)

How reproducible:

100% of the time

Steps to Reproduce:
1. nwipe --autonuke -m prng --noblank --nowait --nogui  /dev/sda 
2. hexdump -C /dev/sda |head
3. See alternating patterns of zeros and PRNG data on disk, not just PRNG data

Actual results:

See nwipe-actual.png ,  Disk is overwritten with repeating cycles of 8 bytes of PRNG data and 8 bytes of zereos

Expected results:

See nwipe-expected.png ,  Disk is overwritten with PRNG data


Additional info:
See attached nwipe-actual.png and nwipe-expected.png for hexdump -C output. Expected output was on disk after running nwipe-0.14-2.el6.i686.rpm  

Internal security regulations require us to overwrite drives with PRNG data. A mix of PRNG data and zeros is not allowed.

I built nwipe-0.16 from upstream and it still suffers from this issue.

Comment 1 Richard Ryder 2014-10-09 13:07:24 UTC
Created attachment 945308 [details]
results of wipe using i686 build

Comment 2 Michal Ambroz 2015-06-22 10:15:30 UTC
Hello,
please I would liketo undestand better your setup.
Do I understand it right that you have been trying to nuke (/dev/sda) the primary root hard-drive from which you have been booting?  
Have you been somehow migrating to ramdisk or was nwipe installed on that disk on the harddrive being nuked?

Michal Ambroz

Comment 3 Michal Ambroz 2015-06-22 10:19:33 UTC
Actually there is /dev/sdb on the screenshot so I guess it is not and issue with nuking the same partition. I will try to reproduce.

Comment 4 Richard Ryder 2015-06-22 12:09:15 UTC
I was booting from a external USB stick and wiping internal drives.

Comment 5 Michal Ambroz 2015-06-22 20:27:19 UTC
Tested with upstream 0.17 - Indeed works bad on 64bit architecture.

I was up to report upstream, and found your bug report:
https://github.com/martijnvanbrummelen/nwipe/issues/7

I have added instructuions how to reproduce in test environment.

Comment 6 Michal Ambroz 2015-06-22 22:14:22 UTC
Proposed patch on:
https://github.com/martijnvanbrummelen/nwipe/issues/7

Comment 7 Fedora Update System 2015-06-23 01:46:23 UTC
nwipe-0.17-2.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/nwipe-0.17-2.el7

Comment 8 Fedora Update System 2015-06-23 01:46:31 UTC
nwipe-0.17-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/nwipe-0.17-2.fc22

Comment 9 Fedora Update System 2015-06-23 01:46:40 UTC
nwipe-0.17-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/nwipe-0.17-2.fc21

Comment 10 Fedora Update System 2015-06-23 01:46:47 UTC
nwipe-0.17-3.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/nwipe-0.17-3.el6

Comment 11 Fedora Update System 2015-06-24 16:02:14 UTC
Package nwipe-0.17-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nwipe-0.17-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10612/nwipe-0.17-2.fc22
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-07-03 18:43:28 UTC
nwipe-0.17-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-07-03 18:50:50 UTC
nwipe-0.17-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-07-14 16:43:24 UTC
nwipe-0.17-2.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2015-07-14 16:45:51 UTC
nwipe-0.17-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.