summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIEJuhu <niejuhu@xiaomi.com>2017-06-10 13:20:41 +0800
committerJuhu Nie <niejuhu@xiaomi.com>2017-06-20 06:32:11 +0000
commitd3c86412adfb3b782ee8b4a70b8c25be5d35138a (patch)
treeb12acd3e782c728bba22027665ea4a33c4a755eb
parent4c28ca1ac89afcc6bb9ec82b7cd4892aaf46addc (diff)
downloadsystem_core-d3c86412adfb3b782ee8b4a70b8c25be5d35138a.tar.gz
system_core-d3c86412adfb3b782ee8b4a70b8c25be5d35138a.tar.bz2
system_core-d3c86412adfb3b782ee8b4a70b8c25be5d35138a.zip
libsysutils: Fix vold vulnerability in FrameworkListener
Don't release the sender socket when FrameworkListener receives a command that exceed the maximum buffer length Bug: https://issuetracker.google.com/issues/62812018 Test: manual Change-Id: I160f504f3fb902ba25fc79deb8ae7d78d811a807
-rw-r--r--libsysutils/src/FrameworkListener.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsysutils/src/FrameworkListener.cpp b/libsysutils/src/FrameworkListener.cpp
index 1b6076fc8..6f76e7679 100644
--- a/libsysutils/src/FrameworkListener.cpp
+++ b/libsysutils/src/FrameworkListener.cpp
@@ -68,7 +68,7 @@ bool FrameworkListener::onDataAvailable(SocketClient *c) {
android_errorWriteLog(0x534e4554, "29831647");
c->sendMsg(500, "Command too large for buffer", false);
mSkipToNextNullByte = true;
- return false;
+ return true;
}
int offset = 0;