[jboss-jira] [JBoss JIRA] (ELY-958) Coverity static analysis: Dereference null return value in KeyUtil (Elytron)

Ilia Vassilev (JIRA) issues at jboss.org
Tue Feb 14 12:52:00 EST 2017


     [ https://issues.jboss.org/browse/ELY-958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilia Vassilev moved WFLY-7960 to ELY-958:
-----------------------------------------

              Project: WildFly Elytron  (was: WildFly)
                  Key: ELY-958  (was: WFLY-7960)
          Component/s:     (was: Security)
    Affects Version/s: 1.1.0.Beta24
                           (was: 11.0.0.Alpha1)


> Coverity static analysis: Dereference null return value in KeyUtil (Elytron)
> ----------------------------------------------------------------------------
>
>                 Key: ELY-958
>                 URL: https://issues.jboss.org/browse/ELY-958
>             Project: WildFly Elytron
>          Issue Type: Bug
>    Affects Versions: 1.1.0.Beta24
>            Reporter: Martin Choma
>            Assignee: Ilia Vassilev
>
> Coverity static analysis found possible use of null object comming from {{RawPBEKey.getSalt()}} passed into {{javax.crypto.spec.PBEParameterSpec.PBEParameterSpec}}
> {code:java|title=javax.crypto.spec.PBEParameterSpec.java}
> public PBEParameterSpec(byte[] salt, int iterationCount) {
>     this.salt = salt.clone();
>     this.iterationCount = iterationCount;
> }
> {code}
> Responsible elytron code:
> {code:java|title=KeyUtils.java}
> if (key instanceof PBEKey && paramSpecClass.isAssignableFrom(PBEParameterSpec.class)) {
>             final PBEKey pbeKey = (PBEKey) key;
>             // TODO: we miss the IV here
>             return paramSpecClass.cast(new PBEParameterSpec(pbeKey.getSalt(), pbeKey.getIterationCount()));
>         }
> {code}
> https://scan7.coverity.com/reports.htm#v23632/p11778/fileInstanceId=8490615&defectInstanceId=2123254&mergedDefectId=1389515



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list