Commit graph

7124 commits

Author SHA1 Message Date
Gabriel Biren
4a0673e369 Add SeLinux policy for supplicant AIDL service.
Bug: 196235436
Test: Manual - connect to WiFi
Change-Id: I613a2e7eac620543872a1af7ed477b8d36713b45
2021-11-02 22:24:39 +00:00
Chris Weir
07fcb348fa Merge "SEPolicy for Netlink Interceptor" 2021-11-02 18:02:45 +00:00
Treehugger Robot
54bd8438b1 Merge "Allow init to write to /proc/cpu/alignment" 2021-11-01 22:33:09 +00:00
Treehugger Robot
e7fa65e301 Merge "Allow vendor charger to set sys.boot_from_charger_mode." 2021-11-01 21:19:39 +00:00
Alistair Delva
6092d633b0 Allow init to write to /proc/cpu/alignment
The root init.rc does "write /proc/cpu/alignment 4", but we don't
actually allow this write in core sepolicy. This seems to be a 32-bit
ARM only proc file.

Noticed when booting 32-bit ARM Cuttlefish.

Bug: 145371497
Change-Id: Ic099395708f7236bcc2fc5c561809a7e129786de
2021-11-01 10:17:26 -07:00
Shuzhen Wang
5f45be324d Merge "Camera: Allow stream socket read/write with surfaceflinger" 2021-11-01 15:08:02 +00:00
Shubang Lu
69a7983d31 Merge "Add SE policy for tv_iapp" 2021-10-29 19:44:18 +00:00
Yifan Hong
70da34e4e3 Allow vendor charger to set sys.boot_from_charger_mode.
This allows booting from charger mode directly without rebooting.

Test: pass
Bug: 203246116
Change-Id: I70d06c0f920c360f4ed6d776cfee98f234d6d97a
2021-10-29 05:33:14 +00:00
Shuzhen Wang
5ed0c50e86 Camera: Allow stream socket read/write with surfaceflinger
This is needed for the camera service to be able to use
AChoreographer ndk.

Test: adb shell dmesg | audit2allow -p policy
Bug: 200306379
Change-Id: I191760f1cdd0a88c9d140fffd4470e9ae1956c52
2021-10-28 15:38:48 -07:00
Steven Moreland
f15d7e3ff5 Merge "Remove bufferhub HAL policy." 2021-10-28 21:12:45 +00:00
brycelee
1a6fbe3dfe Merge "Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"" 2021-10-28 18:31:01 +00:00
Bart Van Assche
e3cfa9e1d3 Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"
This reverts commit 63930d3850.

Reason for revert: Broken build (https://android-build.googleplex.com/builds/submitted/7863094/aosp_raven-userdebug/latest/view/logs/error.log)

Change-Id: I1742d69d471e9b00359a2e7e654aa752513990df
2021-10-28 18:03:49 +00:00
Bart Van Assche
187ffea5b8 Merge "Remove the bdev_type and sysfs_block_type SELinux attributes" 2021-10-28 16:45:54 +00:00
Treehugger Robot
f88e2dfe94 Merge "hal_neverallow: Add hal_uwb_server exceptions" 2021-10-27 21:03:29 +00:00
Roshan Pius
329b0c81a8 hal_neverallow: Add hal_uwb_server exceptions
These are similar to the existing exceptions added for
`hal_uwb_vendor_server`.

Also, added a TODO to remove the older `hal_uwb_vendor` tags once we
migrate to the new T architecture.

Bug: 196225233
Test: Compiles
Change-Id: I2077d409f575a2e46684de4fb92fe3da0cceaf70
2021-10-27 12:46:44 -07:00
Steven Moreland
cc7de177ec Remove bufferhub HAL policy.
The bufferhub daemon policy still remains, since it still needs to be
deleted. However, since the HAL no longer exists, removing policy
related to this.

Bug: 204068144
Test: build only
Change-Id: I96b96c77a39e2ba2024680ebaf3067283d0cfc65
2021-10-27 10:54:45 -07:00
Yifan Hong
388bbbccb3 Add health AIDL HAL.
Test: pass
Bug: 177269435
Change-Id: I755d5158715b38a89a28af753ad4c27cdfa93546
2021-10-26 19:34:34 -07:00
Chris Weir
4ac3d74a70 SEPolicy for Netlink Interceptor
Make Netlink Interceptor work when SELinux is enforcing

Test: Netlink Interceptor HAL comes up and works
Bug: 194683902
Change-Id: I3afc7ae04eba82f2f6385b66ddd5f4a8310dff88
2021-10-26 10:03:14 -07:00
Bart Van Assche
63930d3850 Remove the bdev_type and sysfs_block_type SELinux attributes
Remove these SELinux attributes since the apexd and init SELinux policies
no longer rely on these attributes.

The only difference between a previous version of this patch and the
current patch is that the current patch moves these attributes to the
'compat' policy. See also
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1850656.

This patch includes a revert of commit 8b2b951349 ("Restore permission
for shell to list /sys/class/block"). That commit is no longer necessary
since it was a bug fix for the introduction of the sysfs_block type.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd && adb -e shell dmesg | grep avc
Change-Id: Id7d32a914e48bc74da63d87ce6a09f11e323c186
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-25 16:26:07 -07:00
shubang
9fa7dc9c7b Add SE policy for tv_iapp
Bug: 203730671
Test: cuttlefish;
Change-Id: I533f2004343aafe5660e4018e73111880dfa647f
2021-10-22 00:02:05 -07:00
Yifan Hong
48732e041c Merge "Remove healthd." 2021-10-22 00:06:39 +00:00
Treehugger Robot
5b1dc1693a Merge "Move mediatranscoding type to public" 2021-10-21 11:06:22 +00:00
Jeff Vander Stoep
1b2a0b4dab Move mediatranscoding type to public
Move type to public so that it can be vendor customized. This
can be necessary if (for example) the gralloc/gpu same-process-HAL
requires additional permissions.

Bug: 199581284
Test: build
Change-Id: I61a5a3ad96112d4293fd4bf6d55f939c974643ce
2021-10-21 09:10:45 +02:00
Yifan Hong
aabea20d89 Remove healthd.
Test: pass
Bug: 203245871
Change-Id: I4eb0b4333d7fde2096c4c75b7655baf897900005
2021-10-20 18:47:41 -07:00
Ady Abraham
7ed18e6d66 Composer stable AIDL HAL sepolicy
Test: build + presubmit
Bug: 198690444
Change-Id: I6a26823c4ad363d137526c96580b05363d0ac894
2021-10-20 02:58:20 +00:00
Ady Abraham
df28371462 Remove vrflinger
Not used anymore.

Test: build + presubmit
Bug: 170681929
Change-Id: I3ac9b842f89acf620e9f08516e44977d83064f2f
2021-10-20 02:02:57 +00:00
Michał Brzeziński
04e3a05fde Merge "Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"" 2021-10-19 13:03:18 +00:00
Michał Brzeziński
e8739ba23a Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"
Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"

Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"

Revert submission 1850578-remove-selinux-bdev-type

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/203480787

BUG: 203480787

Reverted Changes:
I263bce9c4:Remove the bdev_type and sysfs_block_type SELinux ...
Ibc9039f96:Revert "Add the 'bdev_type' attribute to all block...
Ic6ae83576:Remove the bdev_type and sysfs_block_type SELinux ...
Ie493022a8:Remove the bdev_type and sysfs_block_type SELinux ...
I1f1ca439b:Revert "Add the 'bdev_type' attribute to all block...
I283f8676b:Revert "Add the 'bdev_type' attribute to all block...
I7c5c242c5:Revert "Add the 'bdev_type' attribute to all block...
Id78d8f7dc:Remove the bdev_type and sysfs_block_type SELinux ...
I9c4b2c48b:Remove the bdev_type and sysfs_block_type SELinux ...
I51e9d384a:Remove the bdev_type and sysfs_block_type SELinux ...
I2c414de3b:Remove the sysfs_block_type SELinux attribute

Change-Id: I55609803d530772d507d9dca8ba202a96daf24b7
2021-10-19 10:57:42 +00:00
Treehugger Robot
0503ed283e Merge "Remove the bdev_type and sysfs_block_type SELinux attributes" 2021-10-19 01:05:55 +00:00
Bart Van Assche
c50f66900f Remove the bdev_type and sysfs_block_type SELinux attributes
Remove these SELinux attributes since adding these attributes introduces
a depencency from vendor SELinux policies on the generic SELinux policy,
something that is not allowed. This patch includes a revert of commit
8b2b951349 ("Restore permission for shell to list /sys/class/block").
That commit is no longer necessary since it was a bug fix for the
introduction of the sysfs_block type.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: Ic6ae835768212648ca09fd5c83c39180103c3b1b
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-18 11:37:09 -07:00
Maurice Lam
1517644d4d SELinux rules for virtual device
Bug: 194949534
Test: Manual
Change-Id: I5fcc83e313ce464e4a855b24d32fc2d82ee0b07e
2021-10-15 18:16:01 -07:00
Arthur Ishiguro
29dc02c044 Sensors stable AIDL HAL sepolicy
Bug: 195593357
Test: TreeHugger
Change-Id: I02b88a93d829654a1ce946681b59e648b2cd7550
2021-10-15 17:39:56 +00:00
Treehugger Robot
7609e175c5 Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" 2021-10-14 17:58:57 +00:00
Bart Van Assche
398b0af20f Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these attributes since these will be removed soon.

Bug: 202520796
Test: (AOSP) source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd && adb -e shell dmesg | grep avc
Test: (sc-v2-dev) source build/envsetup.sh && lunch ...-userdebug && m && install-images-on-phone && adb root && adb dmesg | grep 'avc.*comm=.init'
Change-Id: I9f5a4c5c4d6c44fefa8e66c69fec62c99f9a728d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-14 09:13:58 -07:00
Dave McCloskey
74fd233c29 Merge "SEPolicy changes to support Attestation Verification Service" 2021-10-14 00:12:50 +00:00
Treehugger Robot
b664b0ac79 Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" 2021-10-12 18:26:02 +00:00
Bart Van Assche
6b53d731fd Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these attributes since these will be removed soon.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: I61dffb482f4e952299156f34be642ae52fcbfeb3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-12 09:45:11 -07:00
Ian Hua
91d153e9b5 Update sepolicy for adding nnapi_native namespace.
Test: mm
Bug: 201399117
Change-Id: I40a2431b6f5a54deae27fe68f503aff9b99e2793
2021-10-12 11:50:26 +01:00
Dave McCloskey
a7e47db710 SEPolicy changes to support Attestation Verification Service
Bug: 201696614
Change-Id: I4a7a830ba809ed59a030a87c4f479199685d8a42
Test: Verify device boots
2021-10-08 14:53:24 -07:00
Xin Li
2b2247f14c Merge "Merge Android 12" 2021-10-07 23:50:37 +00:00
David Anderson
2c6b2326a7 Merge "allow init to set status on loop device" 2021-10-07 15:49:18 +00:00
Enrico Granata
393ebdda04 Merge "Introduce ro.boot.hypervisor properties" am: dd35626853
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1843773

Change-Id: I4ff9a7c008590a5ca17987aac95c5afab441f392
2021-10-04 19:20:47 +00:00
Enrico Granata
645c390d1a Introduce ro.boot.hypervisor properties
In virtualized deployments of Android, it can be useful to have
access to a description of the hypervisor/host environment being
used to run the guest OS instance.

This is represented by means of a new system property
ro.boot.hypervisor.version, which is meant to convey a
free-form descriptor of the current host/hypervisor version

The property is meant to be provided to Android as androidboot.
by whatever host-specific means are used to supply other boot
properties to the target Android instance. Access could be later
opened to other vendor processes to set if needed for specific
setups where init is not a sufficiently-early stage for
host/guest communication. Such setups are not known at this time.

For a native Android incantation, the property defaults to
being missing

Other properties could later be added to this same namespace
and context if they turn out to be useful in specific scenarios.

Bug: 178749018
Test: build cuttlefish
Change-Id: Id721c14ef1958b525c2866a660dcae8fd176a79d
2021-10-04 11:14:03 -06:00
Liangcai Fan
486be79cb7 allow init to set status on loop device
Bug: 200904398

Change-Id: I02b0a4edcd47e325da7ec8200d5167485e4084c9
Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
2021-10-01 10:49:40 +08:00
Treehugger Robot
7301e308bb Merge "Grant apexd access the SELinux type sysfs_devices_block" am: d190e5242d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1834854

Change-Id: Iad612edd06d3f35a470b1936e15efeeceb918f5f
2021-09-24 02:17:05 +00:00
Bart Van Assche
27f77dc9b0 Grant apexd access the SELinux type sysfs_devices_block
Commit ec50aa5180 ("Allow the init and apexd processes to read all
block device properties") did not include the SELinux type
sysfs_devices_block although it should have included that SELinux
type. Fix this.

Bug: 194726804
Change-Id: Ia299a0a8b28160c634863e15ae66fae8f18a5efb
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-09-23 09:52:11 -07:00
Arthur Ishiguro
e310e59585 Allow dumpstate to dump Context Hub HAL am: 876ded0bf8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1833654

Change-Id: I13e5d45df4881c39ef65fc69bc2609f0aad9ff86
2021-09-22 23:18:11 +00:00
Arthur Ishiguro
876ded0bf8 Allow dumpstate to dump Context Hub HAL
Bug: 194285834
Test: adb bugreport
Change-Id: I6cd7efddf207b896303278539ddb824ad2e4c454
2021-09-22 18:44:49 +00:00
Treehugger Robot
c7801169d8 Merge "Bundle proc_bootconfig permission into read_fstab" am: 855f16dd87
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1826536

Change-Id: I93104b7549a3596ad62a37f80ab747f8cc770a90
2021-09-15 03:51:17 +00:00
Treehugger Robot
855f16dd87 Merge "Bundle proc_bootconfig permission into read_fstab" 2021-09-15 03:36:24 +00:00