-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
SIGSEGV: segmentation violation #174
Comments
@ericwb I can reproduce the crash with the latest gas version. Please could you provide more info? I tried this:
|
The error occurs specifically on the
|
I still cannot reproduce it. Do you use the latest gas version from master? Which is your Go version and OS? My Go version:
|
Hello,
Attached file is renamed to .txt P.P. |
@peyoh Please could you check if the panic still occur with this fix? It would be great if you could point me to the package from where the attached code originates. Somehow, I cannot reproduce it on my machine:
|
Hi @cosmincojocar , /fabric/core/fsm.go The file is from a project: |
@cosmincojocar It's quite possible, that something in the install process could be wrong.
Because I'm not Golang developer, BRS/ |
@peyoh you can clone the repo, checkout the branch with the fix. And then run these commands in the root of the repository:
You should have a local gas binary which you can use to analyze the code. |
@cosmincojocar c.Info.TypeOf(complit.Type).String() == t.requiredType |
@peyoh Do I understand correctly? Is the fix effective? |
Sorry for the late reply. This is my go version.
|
TypeOf returns the type of expression e, or nil if not found. We are calling .String() on a value that may be nil in this clause. Closes securego#174
I'm having problems reproducing either of these crashes using current version gas on master as well. Can you confirm the commit your built / running against like so:
In any case I've identified one potential cause in #181. @cosmincojocar I think this is more likely the culprit than the context being nil as in #180 as the failure is too consistently in the TLS rule, and other rules will break if the context is nil. |
Hello,
|
TypeOf returns the type of expression e, or nil if not found. We are calling .String() on a value that may be nil in this clause. Relates to #174
I'm going to close this for now. I think #181 is the correct fix for this bug. If anybody hits it again please re-open. |
* Add a tool to generate the TLS configuration form Mozilla's ciphers recommendation (#178) * Add a tool which generates the TLS rule configuration from Mozilla server side TLS configuration * Update README * Remove trailing space in README * Update dependencies * Fix the commends of the generated functions * Add nil pointer check to rule. (#181) TypeOf returns the type of expression e, or nil if not found. We are calling .String() on a value that may be nil in this clause. Relates to #174 * Add support for YAML output format (#177) * Add YAML output format * Update README * added rule to check for tainted file path * added #nosec to main/issue.go * updated test case import
When using gas to scan golang.org/x/crypto/acme/autocert/autocert.go, I get the following segmentation violation:
To reproduce:
The text was updated successfully, but these errors were encountered: