Commit Graph

5 Commits

Author SHA1 Message Date
Jeff Vander Stoep 165b4ae091 Enforce ioctl command whitelisting on all sockets
Remove the ioctl permission for most socket types. For others, such as
tcp/udp/rawip/unix_dgram/unix_stream set a default unprivileged whitelist
that individual domains may extend (except where neverallowed like
untrusted_app). Enforce via a neverallowxperm rule.

Change-Id: I7573fdb24f9c53ad169bce2aeab1baac8b2a11ea
2017-09-20 20:56:43 +00:00
Nick Kralevich 1cddd4cf6d mediaserver: remove text relocation support
No longer needed.

Bug: 20013628
Change-Id: I8dbd2996c56261f2c7ba9cfa347998a253710ccf
2015-10-27 16:58:02 -07:00
Nick Kralevich a290950462 mediaserver: allow loading shared library with text relocation
Bionic commit 8fdb3419a51ffeda64f9c811f22a42edf9c7f633 modified how we
handle shared libraries with text relocations, which triggered
an execmod denial when handling /system/vendor/lib/libmmjpeg.so.

Allow the mediaserver process to load shared libraries with text
relocations.

STEPS TO REPRODUCE:
  1.Flash and Factory wipe the device.
  2.Launch Camera.
  3.Capture image tapping on shutter button and observe.
  4.Then try to switch to video mode and observe.

OBSERVED RESULTS:
  Shutter button gets disabled on capturing a picture and then
  switching to video mode displays 'Can't connect to camera error'

EXPECTED RESULTS:
  Camera should work without any error.

Addresses the following denial:

   avc: denied { execmod } for path="/system/vendor/lib/libmmjpeg.so" dev="mmcblk0p25" ino=1734 scontext=u:r:mediaserver:s0 tcontext=u:object_r:system_file:s0 tclass=file

Bug: 20081970
Bug: 20013628
Change-Id: Ie98e7316bd124d58ebb1c529acc865074c8851e6
2015-04-06 13:22:55 -07:00
Stephen Smalley dbbd0228a8 Rewrite mediaserver socket rule using macro.
Addresses denials such as:
 avc:  denied  { ioctl } for  pid=31771 comm="mediaserver" path="socket:[217520]" dev="sockfs" ino=217520 scontext=u:r:mediaserver:s0 tcontext=u:r:mediaserver:s0 tclass=socket

We may want to take this to core policy.

Change-Id: I633346feac8f16bea15df6924cf9ec856ae95e79
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-03-21 13:36:29 -04:00
Robert Craig 9d6624a0b5 Add to selinux policy.
Bring policy over from the mako board which
has a lot of similar domains and services.
mako is also a Qualcomm board which allows
a lot of that policy to be directly brought
over and applied.

Included in this are some radio specific
pieces. Though not directly applicable to
flo, the deb board inherits this policy.

Change-Id: I6b294c7dc830189c08f1f981a239234a2c3f577f
2013-11-15 14:24:59 -05:00