content: package fuzion24.device.vulnerability.vulnerabilities.kernel;
  
  import android.content.Context;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import fuzion24.device.vulnerability.util.CPUArch;
  import fuzion24.device.vulnerability.vulnerabilities.VulnerabilityTest;
  
  public class CVE_2014_3153 implements VulnerabilityTest {
      static {
          System.loadLibrary("cve-2014-3153");
      }
  
  
      @Override
      public List<CPUArch> getSupportedArchitectures() {
          ArrayList<CPUArch> archs = new ArrayList<>();
          archs.add(CPUArch.ARM);
          archs.add(CPUArch.ARM7);
          archs.add(CPUArch.ARM8);
          return archs;
      }
  
      @Override
      public String getCVEorID() {
          return "CVE-2014-3153";
      }
  
      private native int checkFutex();
  
      @Override
      public boolean isVulnerable(Context context) throws Exception {
          int checkVal = checkFutex();
  
          if(checkVal == 22) {
              return false;
          }else if(checkVal == 14) {
              return true;
          }else {
              throw new Exception("Error running test. Errno: " + checkVal);
          }
      }
  }