Wow, Luke you are the man.

> Probably right, if they were pushing strong release dates, they'd go with
> freebsd or linux
> 
> On Sat, Sep 3, 2016, 05:44 Theo de Raadt <dera...@openbsd.org> wrote:
> 
> > Not a strong requirement.
> >
> > > If a program requires studio, wpath, rpath, dns, and inet. It spawns
> > > multiple threads. The socket binding thread is taken over, runs arbitrary
> > > code that overflows a buffer of the thread listening to a pipe with rpath
> > > and stdio permissions it reads the binary of an executable the company
> > > wants to remain private, but is on the paths list, which gives the
> > process
> > > unintentional read permissions and sends it to the attacker.
> > > Because we know everybody writes perfect code. With finer grained paths
> > > permissions, it is possible to gain even better control amidst really
> > well
> > > pledged and privilege separated programs(even if they are imperfectly
> > > bounded), it may be possible to have a slightly more complicated paths
> > > setup with less privilege separation, written by programmers that spend a
> > > bit less time with privilege separation, to meet deadlines and achieve
> > > comparable results.
> > >
> > > On Sat, Sep 3, 2016, 04:41 ludovic coues <cou...@gmail.com> wrote:
> > >
> > > > 2016-09-03 11:04 GMT+02:00 Luke Small <lukensm...@gmail.com>:
> > > > >
> > > > >
> > > > > Sorry  I was in the middle of something, but pledge can be a broad
> > brush,
> > > > > unless you are dealing with one file, whether it is executed, read,
> > or
> > > > > written and giving per process file permissions sounds pretty neat,
> > and
> > > > it
> > > > > might just be a little simpler than making new users for each subset
> > of
> > > > > privileges, populating each chrooted home folder with a specific set
> > of
> > > > > permissions (as is what appears to me to have happened with pkg_add).
> > > > Since
> > > > > pledge's promises can make it where you can execute a file without
> > read
> > > > > permission, it seems ideal to continue that tradition with the paths
> > > > >
> > > > >   On Sat, Sep 3, 2016, 03:07 Luke Small <lukensm...@gmail.com>
> > wrote:
> > > > >>
> > > > >> In pledge, presumably there will be an accessible paths list. Maybe
> > you
> > > > >> grant a process root access, and you need to read a file which is
> > only
> > > > >> granted by root access, and you need write access for another file,
> > so
> > > > the
> > > > >> pledge permissions reflect that. On the presumed current path, you
> > would
> > > > >> leave write access for the first file and maybe you don't need the
> > > > process
> > > > >> to have read permissions on an execl() program. You can prohibit
> > your
> > > > >> process from reading your software or binary, even if it may have
> > > > >> permissions to do so.
> > > > >>
> > > >
> > > > That's not a specific use case.
> > > > Either you should provide a patch or an exemple of a real program that
> > > > is limited by the current design of pledge.
> > > >
> > > > Currently, if you want a program that can only read a file, you pledge
> > > > rpath. If you want the ability to exec file, you pledge exec.
> > > >
> > > > If you want a program that can exec a set of file and write in
> > > > another, either you run your program as a user and group that can't
> > > > write the set of file you want to exec (W^X) or you write two program,
> > > > one pledging for write the other for read.
> > > >
> > > > There following paper have an exemple of how the second design can be
> > done.
> > > > http://quigon.bsws.de/papers/2014/asiabsdcon/mgp00010.html
> > > >
> > > >
> > > > --
> > > >
> > > > Cordialement, Coues Ludovic
> > > > +336 148 743 42
> > >
> >
> >
> 
> --94eb2c07d10429a200053b98ce09
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
> 
> <p dir=3D"ltr">Probably right, if they were pushing strong release dates, t=
> hey&#39;d go with freebsd or linux</p>
> <br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sat, Sep 3, 2016, 05:44 =
> Theo de Raadt &lt;<a href=3D"mailto:dera...@openbsd.org";>dera...@openbsd.or=
> g</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
> :0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Not a strong requi=
> rement.<br>
> <br>
> &gt; If a program requires studio, wpath, rpath, dns, and inet. It spawns<b=
> r>
> &gt; multiple threads. The socket binding thread is taken over, runs arbitr=
> ary<br>
> &gt; code that overflows a buffer of the thread listening to a pipe with rp=
> ath<br>
> &gt; and stdio permissions it reads the binary of an executable the company=
> <br>
> &gt; wants to remain private, but is on the paths list, which gives the pro=
> cess<br>
> &gt; unintentional read permissions and sends it to the attacker.<br>
> &gt; Because we know everybody writes perfect code. With finer grained path=
> s<br>
> &gt; permissions, it is possible to gain even better control amidst really =
> well<br>
> &gt; pledged and privilege separated programs(even if they are imperfectly<=
> br>
> &gt; bounded), it may be possible to have a slightly more complicated paths=
> <br>
> &gt; setup with less privilege separation, written by programmers that spen=
> d a<br>
> &gt; bit less time with privilege separation, to meet deadlines and achieve=
> <br>
> &gt; comparable results.<br>
> &gt;<br>
> &gt; On Sat, Sep 3, 2016, 04:41 ludovic coues &lt;<a href=3D"mailto:couesl@=
> gmail.com" target=3D"_blank">cou...@gmail.com</a>&gt; wrote:<br>
> &gt;<br>
> &gt; &gt; 2016-09-03 11:04 GMT+02:00 Luke Small &lt;<a href=3D"mailto:luken=
> sm...@gmail.com" target=3D"_blank">lukensm...@gmail.com</a>&gt;:<br>
> &gt; &gt; &gt;<br>
> &gt; &gt; &gt;<br>
> &gt; &gt; &gt; Sorry=C2=A0 I was in the middle of something, but pledge can=
>  be a broad brush,<br>
> &gt; &gt; &gt; unless you are dealing with one file, whether it is executed=
> , read, or<br>
> &gt; &gt; &gt; written and giving per process file permissions sounds prett=
> y neat, and<br>
> &gt; &gt; it<br>
> &gt; &gt; &gt; might just be a little simpler than making new users for eac=
> h subset of<br>
> &gt; &gt; &gt; privileges, populating each chrooted home folder with a spec=
> ific set of<br>
> &gt; &gt; &gt; permissions (as is what appears to me to have happened with =
> pkg_add).<br>
> &gt; &gt; Since<br>
> &gt; &gt; &gt; pledge&#39;s promises can make it where you can execute a fi=
> le without read<br>
> &gt; &gt; &gt; permission, it seems ideal to continue that tradition with t=
> he paths<br>
> &gt; &gt; &gt;<br>
> &gt; &gt; &gt;=C2=A0 =C2=A0On Sat, Sep 3, 2016, 03:07 Luke Small &lt;<a hre=
> f=3D"mailto:lukensm...@gmail.com"; target=3D"_blank">lukensm...@gmail.com</a=
> >&gt; wrote:<br>
> &gt; &gt; &gt;&gt;<br>
> &gt; &gt; &gt;&gt; In pledge, presumably there will be an accessible paths =
> list. Maybe you<br>
> &gt; &gt; &gt;&gt; grant a process root access, and you need to read a file=
>  which is only<br>
> &gt; &gt; &gt;&gt; granted by root access, and you need write access for an=
> other file, so<br>
> &gt; &gt; the<br>
> &gt; &gt; &gt;&gt; pledge permissions reflect that. On the presumed current=
>  path, you would<br>
> &gt; &gt; &gt;&gt; leave write access for the first file and maybe you don&=
> #39;t need the<br>
> &gt; &gt; process<br>
> &gt; &gt; &gt;&gt; to have read permissions on an execl() program. You can =
> prohibit your<br>
> &gt; &gt; &gt;&gt; process from reading your software or binary, even if it=
>  may have<br>
> &gt; &gt; &gt;&gt; permissions to do so.<br>
> &gt; &gt; &gt;&gt;<br>
> &gt; &gt;<br>
> &gt; &gt; That&#39;s not a specific use case.<br>
> &gt; &gt; Either you should provide a patch or an exemple of a real program=
>  that<br>
> &gt; &gt; is limited by the current design of pledge.<br>
> &gt; &gt;<br>
> &gt; &gt; Currently, if you want a program that can only read a file, you p=
> ledge<br>
> &gt; &gt; rpath. If you want the ability to exec file, you pledge exec.<br>
> &gt; &gt;<br>
> &gt; &gt; If you want a program that can exec a set of file and write in<br=
> >
> &gt; &gt; another, either you run your program as a user and group that can=
> &#39;t<br>
> &gt; &gt; write the set of file you want to exec (W^X) or you write two pro=
> gram,<br>
> &gt; &gt; one pledging for write the other for read.<br>
> &gt; &gt;<br>
> &gt; &gt; There following paper have an exemple of how the second design ca=
> n be done.<br>
> &gt; &gt; <a href=3D"http://quigon.bsws.de/papers/2014/asiabsdcon/mgp00010.=
> html" rel=3D"noreferrer" target=3D"_blank">http://quigon.bsws.de/papers/201=
> 4/asiabsdcon/mgp00010.html</a><br>
> &gt; &gt;<br>
> &gt; &gt;<br>
> &gt; &gt; --<br>
> &gt; &gt;<br>
> &gt; &gt; Cordialement, Coues Ludovic<br>
> &gt; &gt; +336 148 743 42<br>
> &gt;<br>
> <br>
> </blockquote></div>
> 
> --94eb2c07d10429a200053b98ce09--

Reply via email to