From 0c94ea393926869f8f620854b58548d7a139ac1f Mon Sep 17 00:00:00 2001 From: Ioana Alexandru Date: Tue, 10 Jan 2023 10:51:21 +0000 Subject: [PATCH] Lower per-app NotificationChannelGroup limit. A higher limit can be abused to cause PDoS. For the rationale behind choosing 6000 as the max value, see http://b/261723753#comment20. Test: atest PreferencesHelperTest Bug: 261723753 Change-Id: I3f3a99765c161369e1b026686a0e5f0c83ed839e (cherry picked from commit 86441bd5c07c65021728748472fa6a28eaf162d0) --- .../java/com/android/server/notification/PreferencesHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/notification/PreferencesHelper.java b/services/core/java/com/android/server/notification/PreferencesHelper.java index d8aa469bcd810..5507158f34da9 100644 --- a/services/core/java/com/android/server/notification/PreferencesHelper.java +++ b/services/core/java/com/android/server/notification/PreferencesHelper.java @@ -108,7 +108,7 @@ public class PreferencesHelper implements RankingConfig { @VisibleForTesting static final int NOTIFICATION_CHANNEL_COUNT_LIMIT = 5000; @VisibleForTesting - static final int NOTIFICATION_CHANNEL_GROUP_COUNT_LIMIT = 50000; + static final int NOTIFICATION_CHANNEL_GROUP_COUNT_LIMIT = 6000; private static final int NOTIFICATION_PREFERENCES_PULL_LIMIT = 1000; private static final int NOTIFICATION_CHANNEL_PULL_LIMIT = 2000;