[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F05DD3E.9060204@redhat.com>
Date: Thu, 05 Jan 2012 18:26:22 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Willy Tarreau <w@....eu>, linux-kernel@...r.kernel.org,
security@...nel.org, pmatouse@...hat.com, agk@...hat.com,
jbottomley@...allels.com, mchristi@...hat.com, msnitzer@...hat.com,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition
devices
On 01/05/2012 06:04 PM, Linus Torvalds wrote:
>
>> > Foolish me who found a bug, and an exploitable one for that matter, and even
>> > tried to fix it. Looks like security by obscurity would have served users better.
> Umm. I just sent out what I think is what we*should* be doing.
>
> You are the one who seems to just want to add hack upon hack to
> things. THAT is what I really hate. It's not only in bad taste, it
> *will* come back and bite us some day.
I could have just written
+ ret = scsi_verify_blk_ioctl(bdev, cmd);
+ if (ret < 0)
+ return -ENOIOCTLCMD;
It wouldn't have been any less hacky, but it would have looked quite
normal and perhaps it would have escaped review. I knew I was working
around messy code, and I made that clear. In that, I succeeded. :)
> If you think that "security" is about adding new special cases and
> hacks, you're so out to lunch that it isn't even funny. It is
> absolutely the*last* thing you want.
Thanks for the tip, :) and thanks for picking up the cleanup. I'll keep
an eye and resubmit when the dust settles.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists