[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130525071118.GA11912@infradead.org>
Date: Sat, 25 May 2013 03:11:18 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Tejun Heo <tj@...nel.org>, Jens Axboe <axboe@...nel.dk>,
lkml <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
Subject: Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization
of the SG_IO command whitelist (CVE-2012-4542))
On Sat, May 25, 2013 at 09:05:25AM +0200, Paolo Bonzini wrote:
> > you could send destructive commands to a partition. The right fix
> > for that would be to not allow SG_IO on partitions at all, just
> > wondering if anything would be broken by this.
>
> Linus wanted to keep that for CAP_SYS_RAWIO. We found two uses of SG_IO
> on partitions: zfs-fuse used SYNCHRONIZE CACHE; some proprietary driver
> used TEST UNIT READY.
>
> Really, the solution is to make the bitmaps configurable in userspace.
> It is no less secure than unpriv_sgio. Then the kernel can be
> configured at build-time to have either an MMC bitmap and a basic
> whitelist of a dozen commands. We can even avoid working around those
> few conflicting opcodes; if you're paranoid you can just configure your
> kernel right.
Keep it simple. Allowing SG_IO for CAP_SYS_RAWIO probably is fine,
allowing it for permissions only clearly isn't. All the per-command
filetering is just complete bullshit and the kind of bloat that
eventually will make Linux unmaintainable.
--
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