Giter Club home page Giter Club logo

chain's People

Contributors

dylanschultzie avatar faddat avatar joeabbey avatar lebascou avatar ricardo-remy avatar segfaultd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chain's Issues

utils: GenerateSecureToken uses a pseudo-random generator which isn't advised for secure and cryptographic purposes, moreover with a predictable seed of time.Now().UnixNano() and on the global reader

While examining this repository for security issues, I noticed that the code for GenerateSecureToken

chain/utils/strings.go

Lines 13 to 19 in 4f801b0

func GenerateSecureToken(length int) string {
rand.Seed(time.Now().UnixNano())
b := make([]byte, length)
if _, err := rand.Read(b); err != nil {
return ""
}
return hex.EncodeToString(b)

uses a pseudo-random generator in math/rand of which even the GoDoc for the package explicitly says https://pkg.go.dev/math/rand image and even if seeded, its outputs can be predicted

Even more, this code uses the global reader with a very weak seed of time.Now().UnixNano() which an attacker can properly trivially find; also it mutates the global pseudo-random reader which makes for even worse predictable state.

This can be a serious security issue.

Suggestion

Please use a stronger source of randomness like crypto/rand and just invoke crypto/rand.Read(seed)

/cc @elias-orijtech @veorq

Cosmos SDK Security Advisory: Release coordination for Cosmos SDK Barberry

The Cosmos SDK team has notified the community that a high-severity security issue patch will be released on June 8th, 16:00UTC. I am contacting you because your network is running an impacted version of the Cosmos SDK and to give advanced notice to prepare for security patch coordination. The patch can be applied without a consensus upgrade and will require at least 33.3% of the validators to update their nodes as quickly as possible to protect the network from exploitation.

When the Cosmos SDK patch is available, it is the responsibility of each network to validate it as quickly as possible, have a security release for the network binary as soon as possible, and coordinate with the network validators to upgrade their nodes as early as possible.

I am contacting you here because there was no e-mail address listed in the SECURITY.MD file for the repository and the HackerOne link listed points to an invalid page. Please populate a SECURITY.MD file with the relevant information (e-mail address) for subsequent reach-outs regarding security updates.

You can find more information on the link above.

Switch lumd keyring default backend

Currently the lumd keyring default backend is set to test instead of file, which is not recommended for production.

This must be a compile time option as there is no config option for it, and as it seems it's not possible to switch from one backend to another without using the --keyring-backend flag with every command that requires key access.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.