lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121102172145.184abfe3@pyramind.ukuu.org.uk>
Date:	Fri, 2 Nov 2012 17:21:45 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Tejun Heo <tj@...nel.org>
Cc:	Paolo Bonzini <pbonzini@...hat.com>,
	Ric Wheeler <rwheeler@...hat.com>,
	Petr Matousek <pmatouse@...hat.com>,
	Kay Sievers <kay@...hat.com>, Jens Axboe <axboe@...nel.dk>,
	linux-kernel@...r.kernel.org,
	"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
Subject: Re: setting up CDB filters in udev (was Re: [PATCH v2 0/3] block:
 add queue-private command filter, editable via sysfs)

> > Not a good model. Any removal of filters and passing them to a task
> > should be explicit. The behaviour really ought to be to permit the
> > intentional setting of explicit filters then passing them, not touch the
> > default behaviour.
> 
> Yeah, well, then I guess it'll have to be a separate ioctl to switch
> SG_IO for !root users.


My first thought would be to have the basic behaviour as


allowed 	IFF	passes user filter
		&&	CAP_SYS_RAWIO || passes 'root' filter


that allows untrusted to also push unprivileged filters for their own
purposes (consider things like exokernel experiments or just trying to
ensure a raw disk emulation doesn't go wrong). The default user feature
would be 'allow anything'.

then add a way to 'set' the root filter only if you have CAP_SYS_RAWIO
with the default 'root' filter being the current hardcoded filter.

That also means that a normal app running as superuser for some reason
would set its user filter and any accidentally inherited descriptors will
be less dangerous as the are today. It also means a CAP_SYS_RAWIO capable
app can still use filters itself as good programming practise.

It effectively means you have to deliberately and intentionally set up an
'inherited' extra rights case.

Alan
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ