[jboss-jira] [JBoss JIRA] (WFLY-7960) Coverity static analysis: Dereference null return value in KeyUtil (Elytron)
Martin Choma (JIRA)
issues at jboss.org
Wed Jan 25 03:53:01 EST 2017
[ https://issues.jboss.org/browse/WFLY-7960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Choma updated WFLY-7960:
-------------------------------
Affects Version/s: 11.0.0.Alpha1
> Coverity static analysis: Dereference null return value in KeyUtil (Elytron)
> ----------------------------------------------------------------------------
>
> Key: WFLY-7960
> URL: https://issues.jboss.org/browse/WFLY-7960
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 11.0.0.Alpha1
> 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