Re: [PATCH] Add security_validatetrans support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 4, 2019 at 2:43 PM William Roberts <bill.c.roberts@xxxxxxxxx> wrote:
>
> On Thu, Apr 4, 2019 at 8:37 AM Joshua Brindle
> <joshua.brindle@xxxxxxxxxxxxxxx> wrote:
> >
> > It seems validatetrans support was never added to libselinux, despite being added to
> > selinuxfs in kernel version 4.5
> >
> > Signed-off-by: Joshua Brindle <joshua.brindle@xxxxxxxxxxxxxxx>
> > ---

>
> I see things like selinux_status_open() not doing it, also it doesn't
> use selinux_page_size but calls
> sysconf() directly, so that might not be the best example. I just
> wonder if we're glossing over truncation
> bugs that might be hard to debug if they ever crop up without explicit errors.

Hrm.. I started off with a copy of compute_relabel.c or something, it
looks like none of these functions check. Checking the snprintf for
the path is probably not helpful, but now that you mention it, a
truncation of the last context could remove some categories and cause
an erroneous decision, and since we don't get the answer back from the
file like the compute_ functions it could cause a vulnerability.

Thanks, will update and resend.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux