Commit graph

2124 commits

Author SHA1 Message Date
Jeff Vander Stoep
e8db0b37ad Merge "Rename qtaguid_proc to conform to name conventions" am: 38a84cf8da
am: d093691cda

Change-Id: Ie6ffba47ea2164260d60115a738c57f0e47f04be
2018-04-03 21:53:11 -07:00
Treehugger Robot
38a84cf8da Merge "Rename qtaguid_proc to conform to name conventions" 2018-04-04 02:26:56 +00:00
Nathan Harold
252b015365 Allow getsockopt and setsockopt for Encap Sockets
Because applications should be able to set the receive
timeout on UDP encapsulation sockets, we need to allow
setsockopt(). getsockopt() is an obvious allowance as
well.

Bug: 68689438
Test: compilation
Merged-In: I2eaf72bcce5695f1aee7a95ec03111eca577651c
Change-Id: I2eaf72bcce5695f1aee7a95ec03111eca577651c
2018-04-03 21:52:14 +00:00
Jeff Vander Stoep
bdf2a9c417 Rename qtaguid_proc to conform to name conventions
Test: build
Bug: 68774956
Change-Id: I0f9fd87eb41e67e14f35e49eba13e3d1de745250
2018-04-03 14:47:38 -07:00
Nathan Harold
b232842b35 Allow getsockopt and setsockopt for Encap Sockets
am: ea4eaaf128

Change-Id: I1b1be4cfd4a4c35ffc3e085bebf386a7aefc4fc2
2018-04-03 13:38:06 -07:00
Jeff Vander Stoep
3aa7ca56fd Add untrusted_app_27
This is a partial cherry pick of commit 6231b4d9
'Enforce per-app data protections for targetSdk 28+'.

Untrusted_app_27 remains unreachable, but it's existence
prevents future merge conflicts.

Bug: 63897054
Test: build/boot aosp_walleye-userdebug
Change-Id: I64b013874fe87b55f47e817a1279e76ecf86b7c0
Merged-In: I64b013874fe87b55f47e817a1279e76ecf86b7c0
(cherry picked from commit 6231b4d9fc)
2018-04-03 12:25:51 -07:00
Jeff Vander Stoep
51ebb60113 Remove deprecated tagSocket() permissions am: 0d1e52a50f
am: c1753b7a14

Change-Id: I5ae0c1791c2e588e6cdd177a4f1a8758cb2de3ad
2018-04-03 10:53:35 -07:00
Nathan Harold
ea4eaaf128 Allow getsockopt and setsockopt for Encap Sockets
Because applications should be able to set the receive
timeout on UDP encapsulation sockets, we need to allow
setsockopt(). getsockopt() is an obvious allowance as
well.

Bug: 68689438
Test: compilation
Change-Id: I2eaf72bcce5695f1aee7a95ec03111eca577651c
2018-04-03 10:28:10 -07:00
Jeff Vander Stoep
0d1e52a50f Remove deprecated tagSocket() permissions
tagSocket() now results in netd performing these actions on behalf
of the calling process.

Remove direct access to:
/dev/xt_qtaguid
/proc/net/xt_qtaguid/ctrl

Bug: 68774956
Test: -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AppSecurityTests
    -m CtsNativeNetTestCases
Test: stream youtube, browse chrome
Test: go/manual-ab-ota
Change-Id: I6a044f304c3ec4e7c6043aebeb1ae63c9c5a0beb
2018-04-03 13:56:58 +00:00
yro
bcefa8ba03 Merge "Update sepolicy to have system_server access stats_data" into pi-dev
am: 199637ebce

Change-Id: Ia6ce6b2955e2a848948eb429d29f1887f25fe43b
2018-04-03 00:01:00 +00:00
TreeHugger Robot
199637ebce Merge "Update sepolicy to have system_server access stats_data" into pi-dev 2018-04-02 19:27:16 +00:00
yro
866a240900 Merge "Update sepolicy to have system_server access stats_data" am: 8b11302e89
am: 7718295a7d

Change-Id: I1cd45d3bdc5a5826dd73376b7480375fefb3ca78
2018-03-31 03:01:33 +00:00
yro
7cacc85daf Update sepolicy to have system_server access stats_data
Bug: 75968642
Test: manual testing to check for sepolicy violation
Cherry-picked from aosp/652222

Change-Id: Idc83669feaf9fd17bed26f89dfce33e3f2f5424f
2018-03-30 18:40:30 -07:00
Treehugger Robot
8b11302e89 Merge "Update sepolicy to have system_server access stats_data" 2018-03-31 01:19:49 +00:00
Treehugger Robot
855c6c162a Merge "Allow incidentd to read LAST_KMSG only for userdebug builds" 2018-03-30 23:24:24 +00:00
TreeHugger Robot
6577b988ac Merge "Allow netutils_wrapper to use pinned bpf program" into pi-dev 2018-03-30 23:10:47 +00:00
yro
36dd2a410c Update sepolicy to have system_server access stats_data
Test: manually tested to prevent sepolicy violation
Change-Id: I9ebcc86464a9fc61a49d5c9be40f19f3523b6785
2018-03-30 15:58:58 -07:00
Chenbo Feng
be9b15c512 Allow netutils_wrapper to use pinned bpf program
The netutils_wrapper is a process used by vendor code to update the
iptable rules on devices. When it update the rules for a specific chain.
The iptable module will reload the whole chain with the new rule. So
even the netutils_wrapper do not need to add any rules related to xt_bpf
module, it will still reloading the existing iptables rules about xt_bpf
module and need pass through the selinux check again when the rules are
reloading. So we have to grant it the permission to reuse the pinned
program in fs_bpf when it modifies the corresponding iptables chain so
the vendor module will not crash anymore.

Test: device boot and no more denials from netutils_wrapper
Bug: 72111305
Change-Id: I62bdfd922c8194c61b13e2855839aee3f1e349be
(cherry picked from aosp commit 2623ebcf8e)
2018-03-30 13:54:31 -07:00
Chenbo Feng
563491d40d Merge "Allow netutils_wrapper to use pinned bpf program" am: 4fb1a145d1
am: 4a0c24edcb

Change-Id: I294bd92866c978e605b4a69d06aa54a6c4bfd85a
2018-03-30 20:18:21 +00:00
Treehugger Robot
4fb1a145d1 Merge "Allow netutils_wrapper to use pinned bpf program" 2018-03-30 20:03:19 +00:00
Pawin Vongmasa
514dde5170 Merge "Put in sepolicies for Codec2.0 services" into pi-dev
am: eaee65f043

Change-Id: I2f4c80d5cf5616f39e1659e23d4d162c84dcfb00
2018-03-30 19:05:15 +00:00
TreeHugger Robot
eaee65f043 Merge "Put in sepolicies for Codec2.0 services" into pi-dev 2018-03-30 17:51:38 +00:00
Yi Jin
7312abeb37 Merge "Allow incidentd to read LAST_KMSG only for userdebug builds" into pi-dev
am: 941cc9c8d2

Change-Id: I5fa2ede7234c3c2180ca89a547e15c8dac2d12b1
2018-03-30 17:26:54 +00:00
Yi Jin
76238cd4ef Allow incidentd to read LAST_KMSG only for userdebug builds
Bug: 73354384
Test: manual
Change-Id: Iaaeded69c287eae757aaf68dc18bc5a0c53b94e6
2018-03-30 10:15:24 -07:00
TreeHugger Robot
941cc9c8d2 Merge "Allow incidentd to read LAST_KMSG only for userdebug builds" into pi-dev 2018-03-30 14:54:55 +00:00
Primiano Tucci
5e4ce771e4 Merge "SELinux changes for I/O tracing." into pi-dev
am: c2e249dd41

Change-Id: I53e5669f0b13193b175a7980ab8d5b2d639ca487
2018-03-30 01:24:52 +00:00
Florian Mayer
9fcf22bb81 SELinux changes for I/O tracing.
See also go/perfetto-io-tracing-security.

* Grant CAP_DAC_READ_SEARCH to traced_probes.
* Allow traced_probes to list selected labels.
* Change ext4 and f2fs events to be available on user builds.

Bug: 74584014
Change-Id: I891a0209be981d760a828a69e4831e238248ebad
2018-03-30 00:32:34 +00:00
Primiano Tucci
c2e249dd41 Merge "SELinux changes for I/O tracing." into pi-dev 2018-03-30 00:31:59 +00:00
Joel Galenson
d65e38b238 Merge "Label /proc/sys/kernel/sched_schedstats." into pi-dev
am: aebeae8156

Change-Id: I42a1ee99885b87391ef1aa49b5554a8e16a3d065
2018-03-29 22:48:18 +00:00
Joel Galenson
4b625e4a35 Label /proc/sys/kernel/sched_schedstats.
This allows init to write to it, which it does for atrace.

Bug: 72643420
Test: Boot two devices, observe no denials, test atrace.
Change-Id: I6810e5dcdfaff176bd944317e66d4fe612ccebed
(cherry picked from commit dce07413bc)
2018-03-29 14:57:10 -07:00
TreeHugger Robot
aebeae8156 Merge "Label /proc/sys/kernel/sched_schedstats." into pi-dev 2018-03-29 21:54:07 +00:00
Florian Mayer
8d81905567 SELinux changes for I/O tracing.
See also go/perfetto-io-tracing-security.

* Grant CAP_DAC_READ_SEARCH to traced_probes.
* Allow traced_probes to list selected labels.
* Change ext4 and f2fs events to be available on user builds.

Bug: 74584014
Cherry-picked from aosp/631805
Change-Id: I891a0209be981d760a828a69e4831e238248ebad
Merged-In: I891a0209be981d760a828a69e4831e238248ebad
2018-03-29 21:15:29 +01:00
Joel Galenson
dce07413bc Label /proc/sys/kernel/sched_schedstats.
This allows init to write to it, which it does for atrace.

Bug: 72643420
Test: Boot two devices, observe no denials, test atrace.
Change-Id: I6810e5dcdfaff176bd944317e66d4fe612ccebed
2018-03-29 12:15:48 -07:00
Jeff Vander Stoep
2b0a493db1 Merge "Improve neverallows on /proc and /sys" am: 4bdefb59ca
am: 86b51f42ce

Change-Id: Iabd8574383217c1c41134ed16f728ca00ec20045
2018-03-29 18:25:01 +00:00
Jeff Vander Stoep
3079d01ad8 Improve neverallows on /proc and /sys
Access to these files was removed in Oreo. Enforce that access is not
granted by partners via neverallow rule.

Also disallow most untrusted app access to net.dns.* properties.

Bug: 77225170
Test: system/sepolicy/tools/build_policies.sh
Change-Id: I85b634af509203393dd2d9311ab5d30c65f157c1
(cherry picked from commit 886aa54bab)
2018-03-29 11:11:23 -07:00
Alan Stokes
509cf6ddf9 Merge "Suppress harmless denials for file creation in cgroupfs." into pi-dev
am: fb735122be

Change-Id: I9062ca72c1fa747c0a8078fd0896e35b80fdffde
2018-03-29 17:46:59 +00:00
Chenbo Feng
2623ebcf8e Allow netutils_wrapper to use pinned bpf program
The netutils_wrapper is a process used by vendor code to update the
iptable rules on devices. When it update the rules for a specific chain.
The iptable module will reload the whole chain with the new rule. So
even the netutils_wrapper do not need to add any rules related to xt_bpf
module, it will still reloading the existing iptables rules about xt_bpf
module and need pass through the selinux check again when the rules are
reloading. So we have to grant it the permission to reuse the pinned
program in fs_bpf when it modifies the corresponding iptables chain so
the vendor module will not crash anymore.

Test: device boot and no more denials from netutils_wrapper
Bug: 72111305
Change-Id: I62bdfd922c8194c61b13e2855839aee3f1e349be
2018-03-29 10:26:29 -07:00
Alan Stokes
832a7042b0 Suppress harmless denials for file creation in cgroupfs.
The kernel generates file creation audits when O_CREAT is passed even
if the file already exists - which it always does in the cgroup cases.

We add neverallow rules to prevent mistakenly allowing unnecessary
create access. We also suppress these denials, which just add noise to
the log, for the more common culprits.

Bug: 72643420
Bug: 74182216

Test: Ran build_policies.sh and checked failures were unrelated.
Test: Device still boots, denials gone.
Change-Id: I034b41ca70da1e73b81fe90090e656f4a3b542dc
(cherry picked from commit 92c149d077)
2018-03-29 10:18:54 -07:00
TreeHugger Robot
fb735122be Merge "Suppress harmless denials for file creation in cgroupfs." into pi-dev 2018-03-29 17:18:05 +00:00
Treehugger Robot
4bdefb59ca Merge "Improve neverallows on /proc and /sys" 2018-03-29 17:08:34 +00:00
TreeHugger Robot
2a053462a8 Merge "Statsd: Allow statsd to contact perfprofd in userdebug" into pi-dev 2018-03-29 16:51:29 +00:00
Alan Stokes
92c149d077 Suppress harmless denials for file creation in cgroupfs.
The kernel generates file creation audits when O_CREAT is passed even
if the file already exists - which it always does in the cgroup cases.

We add neverallow rules to prevent mistakenly allowing unnecessary
create access. We also suppress these denials, which just add noise to
the log, for the more common culprits.

Bug: 72643420
Bug: 74182216

Test: Ran build_policies.sh and checked failures were unrelated.
Test: Device still boots, denials gone.
Change-Id: I034b41ca70da1e73b81fe90090e656f4a3b542dc
2018-03-29 13:51:56 +01:00
Pawin Vongmasa
4be2889477 Put in sepolicies for Codec2.0 services
Test: Builds

Bug: 64121714
Bug: 31973802
Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
2018-03-29 04:42:25 -07:00
Yi Jin
4f69d91244 Allow incidentd to read LAST_KMSG only for userdebug builds
Bug: 73354384
Test: manual
Change-Id: I4fa630624cc247275e11965471461502f451edf4
2018-03-28 15:59:48 -07:00
Jeff Vander Stoep
886aa54bab Improve neverallows on /proc and /sys
Access to these files was removed in Oreo. Enforce that access is not
granted by partners via neverallow rule.

Also disallow most untrusted app access to net.dns.* properties.

Bug: 77225170
Test: system/sepolicy/tools/build_policies.sh
Change-Id: I85b634af509203393dd2d9311ab5d30c65f157c1
2018-03-28 15:56:36 -07:00
Joel Galenson
d93ef542ba Hide some denials.
These denials occur fairly often, causing some logspam.

Bug: 77225170
Test: Boot device.
Merged-In: Icd73a992aee44007d0873743f706758f9a19a112
Change-Id: Icd73a992aee44007d0873743f706758f9a19a112
(cherry picked from commit a66d1a4543)
2018-03-28 15:17:02 -07:00
Joel Galenson
b90a05296e Merge "Hide some denials." into pi-dev
am: eee056d512

Change-Id: I966b21e984db17094c6bc4e429034ffc9f45e211
2018-03-28 21:13:52 +00:00
TreeHugger Robot
eee056d512 Merge "Hide some denials." into pi-dev 2018-03-28 20:27:32 +00:00
Joel Galenson
a66d1a4543 Hide some denials.
These denials occur fairly often, causing some logspam.

Bug: 77225170
Test: Boot device.
Change-Id: Icd73a992aee44007d0873743f706758f9a19a112
2018-03-28 19:38:36 +00:00
Jaekyun Seok
588d49712c Merge "Allow vendor-init-settable to persist.radio.multisim.config" am: c22f971195
am: 66a8672393

Change-Id: I87d4691d6a80de7304b1bba71d7b51266dc2d496
2018-03-28 04:10:01 +00:00