mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-23 22:49:28 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Pinyao Ting <pinyaoting@google.com>
|
|
Date: Mon, 24 Jul 2023 14:58:56 -0700
|
|
Subject: [PATCH] Validate userId when publishing shortcuts
|
|
|
|
Bug: 288110451
|
|
Test: manual
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:01bfd04ff445db6290ae430d44ea1bf1a115fe3c)
|
|
Merged-In: Idbde676f871db83825155730e3714f3727e25762
|
|
Change-Id: Idbde676f871db83825155730e3714f3727e25762
|
|
---
|
|
services/core/java/com/android/server/pm/ShortcutService.java | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
|
|
index 5e58ca73ccd4..2e2883dcb2a5 100644
|
|
--- a/services/core/java/com/android/server/pm/ShortcutService.java
|
|
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
|
|
@@ -1594,6 +1594,10 @@ public class ShortcutService extends IShortcutService.Stub {
|
|
android.util.EventLog.writeEvent(0x534e4554, "109824443", -1, "");
|
|
throw new SecurityException("Shortcut package name mismatch");
|
|
}
|
|
+ final int callingUid = injectBinderCallingUid();
|
|
+ if (UserHandle.getUserId(callingUid) != si.getUserId()) {
|
|
+ throw new SecurityException("User-ID in shortcut doesn't match the caller");
|
|
+ }
|
|
}
|
|
|
|
private void verifyShortcutInfoPackages(
|