From: Craig Ruff <cruff@ucar.edu>
To: Andre Hedrick <andre@linux-ide.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Microsoft ZERO Sector Virus, Result of Taskfile WAR
Date: Wed, 7 Mar 2001 15:05:06 -0700 [thread overview]
Message-ID: <20010307150506.A1046@bells.scd.ucar.edu> (raw)
In-Reply-To: <20010307135811.A20146@bells.scd.ucar.edu> <Pine.LNX.4.10.10103071315180.19253-200000@master.linux-ide.org>
In-Reply-To: <Pine.LNX.4.10.10103071315180.19253-200000@master.linux-ide.org>; from andre@linux-ide.org on Wed, Mar 07, 2001 at 01:15:46PM -0800
On Wed, Mar 07, 2001 at 01:15:46PM -0800, Andre Hedrick wrote:
>
> Then run this and see if you live.
Well, I ran it, the disk lives. The typescript is appended below.
Interestingly, scsikiller didn't cream the partition table like I
expected. However the dd if=/dev/zero of=/dev/sdc certainly did.
I've been using dd to copy entire disks for 18 years. Not just SCSI,
but SMD, IPI and IDE. I've never had a problem with multi-sector writes
starting at any sector on drives. Unless there is a bug in the
drive's firmware, about the only thing you can do software wise to
a SCSI disk is to interrupt a format command, which can leave things
messed up a bit until the next format.
Script started on Wed Mar 7 14:55:00 2001
bells# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 255 heads, 63 sectors, 553 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 553 4441941 83 Linux
Command (m for help): q
bells# dd if=/dev/sdc of=sdc.part bs=512 count=1
1+0 records in
1+0 records out
bells# cat scsikiller.c
/* scsikiller.c */
#include <sys/ioctl.h>
#include <sys/fcntl.h>
#include <scsi/scsi.h>
struct cdb6hdr{
unsigned int inbufsize;
unsigned int outbufsize;
unsigned char cdb [6];
} __attribute__ ((packed));
int main (int argv, char **argc)
{
int fd;
unsigned char tBuf[526];
struct cdb6hdr *ioctlhdr;
if (argv != 2) exit(-1);
fd = open (*(argc+1), O_RDWR );
if (fd < 0) exit (-1);
memset(&tBuf, 0, 526);
ioctlhdr = (struct cdb6hdr *) &tBuf;
ioctlhdr->inbufsize = 512;
ioctlhdr->outbufsize = 0;
ioctlhdr->cdb[0] = WRITE_6;
ioctlhdr->cdb[4] = 1;
return ioctl(fd, 1, &tBuf);
}
bells# cc -o scsikiller scsikiller.c
bells# scsikiller /dev/sdc
bells# dd if=/dev/sdc of=/dev/null bs=512 count=100
100+0 records in
100+0 records out
bells# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 255 heads, 63 sectors, 553 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 553 4441941 83 Linux
Command (m for help): q
bells# dd if=sdc.part of=/dev/sdc
1+0 records in
1+0 records out
bells# dd if=/dev/sdc of=/dev/null bs=512 count=100
100+0 records in
100+0 records out
bells# dd if=/dev/zero of=/dev/sc bs=512 count=100
100+0 records in
100+0 records out
bells# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun or SGI disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Command (m for help): q
bells# dd if=sdc.part of=/dev/sdc
1+0 records in
1+0 records out
bells# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 255 heads, 63 sectors, 553 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 553 4441941 83 Linux
Command (m for help): q
bells# ^D\b\bexit
Script done on Wed Mar 7 14:57:35 2001
next prev parent reply other threads:[~2001-03-07 22:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-06 20:10 Andre Hedrick
2001-03-06 20:44 ` Mike Dresser
2001-03-06 20:55 ` Andre Hedrick
2001-03-06 20:48 ` Jens Axboe
2001-03-06 20:59 ` Andre Hedrick
2001-03-06 21:23 ` James A. Sutherland
2001-03-06 21:26 ` Andre Hedrick
2001-03-06 21:31 ` Jens Axboe
2001-03-06 21:35 ` Andre Hedrick
2001-03-07 5:30 ` J. Dow
2001-03-07 12:21 ` Harvey Fishman
2001-03-07 20:32 ` Andre Hedrick
2001-03-07 20:58 ` Craig Ruff
2001-03-07 21:15 ` Andre Hedrick
2001-03-07 22:05 ` Craig Ruff [this message]
2001-03-07 22:35 ` Andre Hedrick
2001-03-07 22:41 ` Craig Ruff
2001-03-07 21:17 ` Richard B. Johnson
2001-03-07 22:09 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010307150506.A1046@bells.scd.ucar.edu \
--to=cruff@ucar.edu \
--cc=andre@linux-ide.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®