indutny / indutny/ocsp

Invalid signature leads to process termination

Open
#42 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
86
Forks
46
PR merge metrics
No merged PRs in 30d

Description

The `findResponder()` routing in `verify.js` will throw an exception in case it is unable to verify the signature. This exception is not caught in `verify()` and thus will lead to crashing of the application.

```
project/node_modules/ocsp/lib/ocsp/verify.js:25
throw new Error('Invalid signature');
^

Error: Invalid signature
at findResponder (project/node_modules/ocsp/lib/ocsp/verify.js:25:13)
at Object.verify (project/eidas-cert-check/node_modules/ocsp/lib/ocsp/verify.js:72:22)
at project/node_modules/ocsp/lib/ocsp/check.js:38:12
at done (project/node_modules/ocsp/lib/ocsp/utils.js:26:7)
at IncomingMessage. (project/node_modules/ocsp/lib/ocsp/utils.js:46:7)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1224:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in verify.js at findResponder() and verify(), using the reported invalid-signature stack trace to follow how the exception escapes. Reproduce the invalid-signature case and confirm that verification no longer terminates the process and instead follows the module's existing error-handling path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.