mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-18 03:34:17 +08:00
Reject null signatures in GhidraServer PKI Auth
Fixes auth bypass vulnerability
This commit is contained in:
+8
-8
@@ -141,14 +141,14 @@ public class PKIAuthenticationModule implements AuthenticationModule {
|
||||
DefaultTrustManagerFactory.validateClient(certChain, PKIUtils.RSA_TYPE);
|
||||
|
||||
byte[] sigBytes = sigCb.getSignature();
|
||||
if (sigBytes != null) {
|
||||
|
||||
Signature sig = Signature.getInstance(certChain[0].getSigAlgName());
|
||||
sig.initVerify(certChain[0]);
|
||||
sig.update(token);
|
||||
if (!sig.verify(sigBytes)) {
|
||||
throw new FailedLoginException("Incorrect signature");
|
||||
}
|
||||
if (sigBytes == null) {
|
||||
throw new FailedLoginException("Client signature required");
|
||||
}
|
||||
Signature sig = Signature.getInstance(certChain[0].getSigAlgName());
|
||||
sig.initVerify(certChain[0]);
|
||||
sig.update(token);
|
||||
if (!sig.verify(sigBytes)) {
|
||||
throw new FailedLoginException("Incorrect signature");
|
||||
}
|
||||
|
||||
String dnUsername =
|
||||
|
||||
Reference in New Issue
Block a user