-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: runtime error: index out of range [0] with length 0 #3036
Comments
Looks like some intermediate root certificate has a missing / empty OSCP URI location. |
This comes from https://github.com/zmap/zcrypto/blob/557f3e4940be18b8c2d631190644e15d99441b29/verifier/revocation.go#L52 It will need to be fixed upstream on zcrypto and then the dependency can be updated on the tlsx side. cc @forgedhallpass @Ice3man543 in case you want to open the upstream issue. |
@jimen0 @vzamanillo @Ali-Razmjoo a similar issue was recently fixed at projectdiscovery/tlsx#127 . extra error handling should solve this |
The certificate is obtained by tlsx here: https://sourcegraph.com/github.com/projectdiscovery/tlsx@v1.0.0/-/blob/pkg/tlsx/tls/tls.go?L165-172 Is a certificate without OCSPServer values valid, @tarunKoyalwar? If not, then the correct fix here is to make sure zcryto returns an error on the validation call made here: https://github.com/zmap/zcrypto/blob/557f3e4940be18b8c2d631190644e15d99441b29/x509/x509.go#L1561 If these are valid certs, then I agree with tlsx doing an extra check prior to the revokation check being the correct fix. Edit: per https://www.rfc-editor.org/rfc/rfc5280#section-5.2.7, when present, at least 1 OCSP sever must be listed.
|
@jimen0 , thanks for your response and pointing out error but as you already know browser have stopped using If you look at tlsx code
tlsx does both OCSP and CRL checking . with peculiarity to always parse as much as possible . while browsers only use (CRLSet) hence we will be using Soft-fail statergy to allow missing values as valid since they are already validated with CRLs I hope this resolves your issue |
@Ali-Razmjoo , this will be resolved by error handling in tlsx at projectdiscovery/tlsx#137 . with a upstream patch later . you can expect this is to resolved in next bug fix(minor) release |
The applied fix on projectdiscovery/tlsx#138 it's fine but regardless of this I think zcrypto should return a certificate parsing error as @jimen0 said before. We should fill an issue. |
yup I will create upstream issue/PR for this |
@Ali-Razmjoo , Fix is available at Run following commands git clone https://github.com/projectdiscovery/nuclei.git
git checkout issue-3036-tlsx-panic && cd v2/cmd/nuclei
go build . ./nuclei -l x.txt -o info.txt -nc -stats -c 100 -rl 300 -t C:\Users\x\nuclei-templates\ssl\ssl-dns-names.yaml you can install using #Note: |
Hi, Thanks for the help; the patch you provided fixed the issue. Bests, Ali. |
@Ali-Razmjoo closing issue is handled by internal team . |
Hi,
I wanted to report an issue; I am using the latest version of nuclei (2.8.3) compiled for windows 64bit. I have a list of hosts with the following format
https://ip:port
and after a while, I get the below error message on one of the hosts (not sure which one).I am using this command line to perform the scan:
Unfortunately, I can't see what is in response to share it here.
Bests, Ali.
The text was updated successfully, but these errors were encountered: