mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
082bc48c32
https://review.lineageos.org/q/topic:P_asb_2022-05 https://review.lineageos.org/q/topic:P_asb_2022-06 https://review.lineageos.org/q/topic:P_asb_2022-07 https://review.lineageos.org/q/topic:P_asb_2022-08 https://review.lineageos.org/q/topic:P_asb_2022-09 https://review.lineageos.org/q/topic:P_asb_2022-10 https://review.lineageos.org/q/topic:P_asb_2022-11 https://review.lineageos.org/q/topic:P_asb_2022-12 https://review.lineageos.org/q/topic:P_asb_2023-01 https://review.lineageos.org/q/topic:P_asb_2023-02 https://review.lineageos.org/q/topic:P_asb_2023-03 https://review.lineageos.org/q/topic:P_asb_2023-04 https://review.lineageos.org/q/topic:P_asb_2023-05 https://review.lineageos.org/q/topic:P_asb_2023-06 https://review.lineageos.org/q/topic:P_asb_2023-07 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/361250 https://review.lineageos.org/q/topic:P_asb_2023-08 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/364606 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/365328 https://review.lineageos.org/q/topic:P_asb_2023-09 https://review.lineageos.org/q/topic:P_asb_2023-10 https://review.lineageos.org/q/topic:P_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/374916 https://review.lineageos.org/q/topic:P_asb_2023-12 https://review.lineageos.org/q/topic:P_asb_2024-01 https://review.lineageos.org/q/topic:P_asb_2024-02 https://review.lineageos.org/q/topic:P_asb_2024-03 https://review.lineageos.org/q/topic:P_asb_2024-04 Signed-off-by: Tavi <tavi@divested.dev>
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Devin Moore <devinmoore@google.com>
|
|
Date: Fri, 17 Feb 2023 17:12:46 +0000
|
|
Subject: [PATCH] Check for malformed Sensor Flattenable
|
|
|
|
Test: libsensorserviceaidl_fuzzer with testcase from bug
|
|
Bug: 269014004
|
|
Merged-In: I0e255c64243c38876fb657cbf942fc1613363216
|
|
Change-Id: I0e255c64243c38876fb657cbf942fc1613363216
|
|
(cherry picked from commit aeec1802f7befc8fbb18313ad3ac0969c3811870)
|
|
Merged-In: I0e255c64243c38876fb657cbf942fc1613363216
|
|
(cherry picked from commit on googleplex-android-review.googlesource.com host: f1aa5fb53437ec2fabc9be00099af836da5f07f2)
|
|
Merged-In: I0e255c64243c38876fb657cbf942fc1613363216
|
|
---
|
|
libs/sensor/Sensor.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/libs/sensor/Sensor.cpp b/libs/sensor/Sensor.cpp
|
|
index 2383516c95..f4421c8c65 100644
|
|
--- a/libs/sensor/Sensor.cpp
|
|
+++ b/libs/sensor/Sensor.cpp
|
|
@@ -576,7 +576,13 @@ bool Sensor::unflattenString8(void const*& buffer, size_t& size, String8& output
|
|
return false;
|
|
}
|
|
outputString8.setTo(static_cast<char const*>(buffer), len);
|
|
+
|
|
+ if (size < FlattenableUtils::align<4>(len)) {
|
|
+ ALOGE("Malformed Sensor String8 field. Should be in a 4-byte aligned buffer but is not.");
|
|
+ return false;
|
|
+ }
|
|
FlattenableUtils::advance(buffer, size, FlattenableUtils::align<4>(len));
|
|
+
|
|
return true;
|
|
}
|
|
|