
CVE-2017-13286 Poc(사용 불가)
CVE-2017-13286 Poc(사용 불가)
모든 자료는 다음 문서에서 가져왔습니다 https://bbs.kanxue.com/thread-268506.htm
public void writeToParcel(Parcel dest, int flags) {
if (dest == null) {
throw new IllegalArgumentException("dest must not be null");
}
dest.writeInt(mRotation);
dest.writeInt(mSurfaceGroupId);
dest.writeInt(mSurfaceType);
dest.writeInt(mConfiguredSize.getWidth());
dest.writeInt(mConfiguredSize.getHeight());
dest.writeInt(mIsDeferredConfig ? 1 : 0);
dest.writeInt(mIsShared ? 1 : 0);
dest.writeTypedList(mSurfaces);
}
private OutputConfiguration(@NonNull Parcel source) {
int rotation = source.readInt();
int surfaceSetId = source.readInt();
int surfaceType = source.readInt();
int width = source.readInt();
int height = source.readInt();
boolean isDeferred = source.readInt() == 1;
// missing write mIsShared
ArrayList<Surface> surfaces = new ArrayList<Surface>();
source.readTypedList(surfaces, Surface.CREATOR);
checkArgumentInRange(rotation, ROTATION_0, ROTATION_270, "Rotation constant");
...
...
...
}
이 AOSP 버전에서 mIsShared가 읽히지 않았지만 쓰여진 것을 볼 수 있습니다
이를 이용하여 악의적인 Parcel 직렬화 데이터를 구성하여 시스템이 어떤 작업을 수행하도록 할 수 있습니다
취약점 코드는 AOSP의 디렉토리: frameworks/base/core/java/android/hardware/camera2/params/OutputConfiguration.java 에 있습니다
이는 수정되었을 뿐만 아니라, 현재의 직렬화 객체에는 더 많은 기본 요소가 추가되었습니다