Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Reject My App implement This Library With Reason: OpenSSL's Security Vulnerabilities . #23

Open
DanhDue opened this issue Apr 29, 2016 · 17 comments

Comments

@DanhDue
Copy link

DanhDue commented Apr 29, 2016

I have implement this library for my app. But when I publish my app to Google Play, they reject it with reason:

This app uses software that contains security vulnerabilities for users. Below is the list of vulnerabilities and the corresponding APK versions that were detected in your recent submission. Please upgrade your app(s) as soon as possible and increment the version number of the upgraded APK.

Vulnerability: OpenSSL
APK Version(s): 1

The vulnerabilities were fixed in OpenSSL versions beginning with 1.0.1h, 1.0.0m, and 0.9.8za. To confirm your OpenSSL version, you can do a grep via:

$ unzip -p YourApp.apk | strings | grep "OpenSSL"

You can find more information and next steps in this Google Help Center article.

I have researched around internet and found warning: OpenSSL using on curl library. Then, can you update OpenSSL and rebuild lib for me?

Please help me fix it!

Thank so much!

@DanhDue DanhDue changed the title Google Reject My App implement This Library Google Reject My App implement This Library With Reason: OpenSSL's Security Vulnerabilities . Apr 29, 2016
@kieukhuongthinh
Copy link

We've got the same issue, too.
Are there anyone have a solution?

@tunahanbayindir
Copy link

Any solution?

@kieukhuongthinh
Copy link

I solved it by updating javacv to 1.2 and javacpp to 1.2.1.

@tunahanbayindir
Copy link

Can you exatcly explain how?

@tunahanbayindir
Copy link

I followed and updated but it gives me fatal signal can't load library libavutil.so, do I need to do anything wih so files?

@kieukhuongthinh
Copy link

Did you update .so files in /[touchToRecordPath]/src/main/jniLibs/ ?
And did you clean and rebuild project?

@tunahanbayindir
Copy link

Actually dont know how to update .so files, could you send me your .so files? tunahan@dodochallenger.com, that would be really helpful

@kieukhuongthinh
Copy link

You can download .so files at:

Unzip .zip file > extract .jar files (you can use .7zip to extract). You can find the solution on github forum of javacv or javacpp. I just did following their guides.

@devendroid
Copy link

I also struggling with this issue,
@kieukhuongthinh I added updated version of javacv and javacpp in gradle as showing in above links, but my app still showing old verison of OpenSSL 1.0.2d 9 Jul 2015,
I think i need to re build all .SO files, how i can do this ?
@tunahanbayindir did you tried this, any luck ?

@kieukhuongthinh
Copy link

@tunahanbayindir , @devsideal : I'm sorry, I wanted to explain in more details before, but I was busy. Now I write a full tutorial (what I did) for you.

First, I use Android Studio. So, if you're using Eclipse, try to find your own way.

The cause of the issue is the libavformat.so file which is using OpenSSL 1.0.2d. We need to update it. But, just updating libavformat.so will cause crashing, so we need to update all relating lib (javacv and javacpp).

  • Download javacv-1.2-bin.zip and javacpp-1.2.3-bin.zip from https://github.com/bytedeco/javacv and https://github.com/bytedeco/javacpp
  • Extract them and copy ffmpeg.jar, javacpp.jar, javacv.jar and opencv.jar to [touchToRecord]\libs.
  • Extract ffmpeg-android-arm.jar and opencv-android-arm.jar (find them after extracting javacv-1.2-bin.zip), you will collect new version of .so files.
  • Replace the old files in [touchToRecord]\src\main\jniLibs\armeabi-v7a with new version (just almost .so files will be replaced, not all of them)
  • Sometimes, you need to copy javacpp-presets-1.2.pom file to [touchToRecord]\libs, too. You can search it on Google.
  • Modify the build.gradle of touchToRecord module
apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.properties'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/opencv/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.properties'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/ffmpeg/pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/1.2/javacpp-presets-1.2.pom.xml'
        pickFirst 'META-INF/maven/org.bytedeco.javacpp-presets/org.bytedeco.javacpp-presets-1.2.pom.xml'
    }
}

configurations {
    all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:support-v4:23.2.1'
    compile files('libs/opencv.jar') //1.2
    compile files('libs/javacv.jar') //1.2
    compile files('libs/javacpp.jar') //1.2.3
    compile files('libs/ffmpeg.jar') //1.2
}
  • Clean project and rebuild.

Good luck.

@devendroid
Copy link

devendroid commented Sep 13, 2016

Thanks a lot @kieukhuongthinh for your explanation, It solved the issue.

@1Dev11
Copy link

1Dev11 commented Sep 17, 2016

thanks @kieukhuongthinh it's help a lot

@tunahanbayindir
Copy link

anyone up? need urgent help

@JustinTanCQ
Copy link

Hi @kieukhuongthinh, after I tried your tutorial, I still got the same issue as @tunahanbayindir. Here is the error logs.
Caused by: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at org.bytedeco.javacpp.Loader.load(Loader.java:474) at org.bytedeco.javacpp.Loader.load(Loader.java:419) at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1559) at com.sourab.videorecorder.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:182) at com.sourab.videorecorder.FFmpegRecorderActivity.initVideoRecorder(FFmpegRecorderActivity.java:404) at com.sourab.videorecorder.FFmpegRecorderActivity.access$1700(FFmpegRecorderActivity.java:68) at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:314) at com.sourab.videorecorder.FFmpegRecorderActivity$2.doInBackground(FFmpegRecorderActivity.java:308) at android.os.AsyncTask$2.call(AsyncTask.java:295)

But the OpenSSL problem was resolved. Now version of OpenSSL is 1.0.2h.

@kieukhuongthinh
Copy link

kieukhuongthinh commented Sep 29, 2016

@JustinTanCQ : check link https://github.com/bytedeco/javacpp-presets/wiki/Issues-with-Build-Tools#gradle . If it's not working, remember cleaning project before building

@JustinTanCQ
Copy link

Thanks @kieukhuongthinh. I followed that instructions but still failed. I do clean before building, even uninstall app first. I unzip the apk and all the .so files are there. I'm testing on a 6.0.1 device, which is based on arm7 system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants