Skip to content

Commit 64b9224

Browse files
committed
Look for bug 23876444 in libstagefright_soft_aacdec.so
1 parent 12ac444 commit 64b9224

File tree

1 file changed

+16
-5
lines changed
  • app/src/main/java/fuzion24/device/vulnerability/vulnerabilities/framework/media

1 file changed

+16
-5
lines changed

app/src/main/java/fuzion24/device/vulnerability/vulnerabilities/framework/media/CVE_2015_6608.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,25 @@ public boolean isVulnerable(Context context) throws Exception {
4848
File stagefrightlib = new File("/system/lib/libstagefright.so");
4949
File stagefrightlib64 = new File("/system/lib64/libstagefright.so");
5050

51+
File softAAClib = new File("/system/lib/libstagefright_soft_aacdec.so");
52+
5153
if(!stagefrightlib.exists() || !stagefrightlib.isFile()){
52-
throw new Exception("Stagefright doesn't exist or is not a file");
54+
throw new Exception("libstagefright.so doesn't exist or is not a file");
55+
}
56+
57+
if(!softAAClib.exists()){
58+
throw new Exception("libstagefright_soft_aacdec.so does not exist");
5359
}
5460

55-
ByteArrayOutputStream baos = new ByteArrayOutputStream((int)stagefrightlib.length());
56-
BinaryAssets.copy(new FileInputStream(stagefrightlib), baos);
61+
ByteArrayOutputStream libStageFrightBAOS = new ByteArrayOutputStream((int)stagefrightlib.length());
62+
BinaryAssets.copy(new FileInputStream(stagefrightlib), libStageFrightBAOS);
63+
byte[] libstagefrightSO = libStageFrightBAOS.toByteArray();
64+
65+
66+
ByteArrayOutputStream libaacdecBAOS = new ByteArrayOutputStream((int)softAAClib.length());
67+
BinaryAssets.copy(new FileInputStream(softAAClib), libaacdecBAOS);
68+
byte[] libaacdecSO = libStageFrightBAOS.toByteArray();
5769

58-
byte[] libstagefrightSO = baos.toByteArray();
5970

6071
KMPMatch binMatcher = new KMPMatch();
6172

@@ -64,7 +75,7 @@ public boolean isVulnerable(Context context) throws Exception {
6475
boolean libstagefrightVulnerableToBug23680780 = indexOf == -1;
6576
indexOf = binMatcher.indexOf(libstagefrightSO, "b/23881715".getBytes());
6677
boolean libstagefrightvulnerableToBug23881715 = indexOf == -1;
67-
indexOf = binMatcher.indexOf(libstagefrightSO, "b/23876444".getBytes());
78+
indexOf = binMatcher.indexOf(libaacdecSO, "b/23876444".getBytes());
6879
boolean libstagerightVulnerableToBug23876444 = indexOf == -1;
6980

7081
//Only affects L and M

0 commit comments

Comments
 (0)