]
Martin Choma reassigned WFLY-7960:
----------------------------------
Assignee: Ilia Vassilev (was: Darran Lofthouse)
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=84906...