You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
3.5 KiB

crypto: fix infinite recursion in Secp256k1 string formatting (#5707) This caused stack overflow panics in E2E tests, e.g.: ``` 2020-11-24T02:37:17.6085640Z validator04 | runtime: goroutine stack exceeds 1000000000-byte limit 2020-11-24T02:37:17.6087818Z validator04 | runtime: sp=0xc0234b23c0 stack=[0xc0234b2000, 0xc0434b2000] 2020-11-24T02:37:17.6088920Z validator04 | fatal error: stack overflow 2020-11-24T02:37:17.6089776Z validator04 | 2020-11-24T02:37:17.6090569Z validator04 | runtime stack: 2020-11-24T02:37:17.6091677Z validator04 | runtime.throw(0x12dc476, 0xe) 2020-11-24T02:37:17.6093123Z validator04 | /usr/local/go/src/runtime/panic.go:1116 +0x72 2020-11-24T02:37:17.6094320Z validator04 | runtime.newstack() 2020-11-24T02:37:17.6095374Z validator04 | /usr/local/go/src/runtime/stack.go:1067 +0x78d 2020-11-24T02:37:17.6096381Z validator04 | runtime.morestack() 2020-11-24T02:37:17.6097657Z validator04 | /usr/local/go/src/runtime/asm_amd64.s:449 +0x8f 2020-11-24T02:37:17.6098505Z validator04 | 2020-11-24T02:37:17.6099328Z validator04 | goroutine 88 [running]: 2020-11-24T02:37:17.6100470Z validator04 | runtime.heapBitsSetType(0xc009565380, 0x20, 0x18, 0x1137e00) 2020-11-24T02:37:17.6101961Z validator04 | /usr/local/go/src/runtime/mbitmap.go:911 +0xaa5 fp=0xc0234b23d0 sp=0xc0234b23c8 pc=0x432625 2020-11-24T02:37:17.6103906Z validator04 | runtime.mallocgc(0x20, 0x1137e00, 0x117b601, 0x11e9240) 2020-11-24T02:37:17.6105179Z validator04 | /usr/local/go/src/runtime/malloc.go:1090 +0x5a5 fp=0xc0234b2470 sp=0xc0234b23d0 pc=0x428b25 2020-11-24T02:37:17.6106540Z validator04 | runtime.convTslice(0xc002743710, 0x21, 0x21, 0xc0234b24e8) 2020-11-24T02:37:17.6107861Z validator04 | /usr/local/go/src/runtime/iface.go:385 +0x59 fp=0xc0234b24a0 sp=0xc0234b2470 pc=0x426379 2020-11-24T02:37:17.6109315Z validator04 | github.com/tendermint/tendermint/crypto/secp256k1.PubKey.String(...) 2020-11-24T02:37:17.6151692Z validator04 | /src/tendermint/crypto/secp256k1/secp256k1.go:161 2020-11-24T02:37:17.6153872Z validator04 | github.com/tendermint/tendermint/crypto/secp256k1.(*PubKey).String(0xc009565360, 0x11e9240, 0xc009565360) 2020-11-24T02:37:17.6157421Z validator04 | <autogenerated>:1 +0x65 fp=0xc0234b24f8 sp=0xc0234b24a0 pc=0x656965 2020-11-24T02:37:17.6159134Z validator04 | fmt.(*pp).handleMethods(0xc00956c680, 0x58, 0xc0234b2801) 2020-11-24T02:37:17.6161462Z validator04 | /usr/local/go/src/fmt/print.go:630 +0x30a fp=0xc0234b2768 sp=0xc0234b24f8 pc=0x518b8a [...] 2020-11-24T02:37:17.6649685Z validator04 | /usr/local/go/src/fmt/print.go:630 +0x30a fp=0xc0234b7f48 sp=0xc0234b7cd8 pc=0x518b8a 2020-11-24T02:37:17.6651177Z validator04 | created by github.com/tendermint/tendermint/node.startStateSync 2020-11-24T02:37:17.6652521Z validator04 | /src/tendermint/node/node.go:587 +0x150 ```
4 years ago
  1. # Unreleased Changes
  2. ## vX.X
  3. Special thanks to external contributors on this release:
  4. @p4u from vocdoni.io reported that the mempool might behave incorrectly under a
  5. high load. The consequences can range from pauses between blocks to the peers
  6. disconnecting from this node. As a temporary remedy (until the mempool package
  7. is refactored), the `max-batch-bytes` was disabled. Transactions will be sent
  8. one by one without batching.
  9. Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermint).
  10. ### BREAKING CHANGES
  11. - CLI/RPC/Config
  12. - [config] \#5598 The `test_fuzz` and `test_fuzz_config` P2P settings have been removed. (@erikgrinaker)
  13. - [config] \#5728 `fast_sync = "v1"` is no longer supported (@melekes)
  14. - [cli] \#5772 `gen_node_key` prints JSON-encoded `NodeKey` rather than ID and does not save it to `node_key.json` (@melekes)
  15. - [cli] \#5777 use hypen-case instead of snake_case for all cli comamnds and config parameters
  16. - Apps
  17. - [ABCI] \#5447 Remove `SetOption` method from `ABCI.Client` interface
  18. - [ABCI] \#5447 Reset `Oneof` indexes for `Request` and `Response`.
  19. - [ABCI] \#5818 Use protoio for msg length delimitation. Migrates from int64 to uint64 length delimiters.
  20. - P2P Protocol
  21. - Go API
  22. - [abci/client, proxy] \#5673 `Async` funcs return an error, `Sync` and `Async` funcs accept `context.Context` (@melekes)
  23. - [p2p] Removed unused function `MakePoWTarget`. (@erikgrinaker)
  24. - [libs/bits] \#5720 Validate `BitArray` in `FromProto`, which now returns an error (@melekes)
  25. - [proto/p2p] Renamed `DefaultNodeInfo` and `DefaultNodeInfoOther` to `NodeInfo` and `NodeInfoOther` (@erikgrinaker)
  26. - [proto/p2p] Rename `NodeInfo.default_node_id` to `node_id` (@erikgrinaker)
  27. - [libs/os] Kill() and {Must,}{Read,Write}File() functions have been removed. (@alessio)
  28. - Blockchain Protocol
  29. ### FEATURES
  30. ### IMPROVEMENTS
  31. - [crypto/ed25519] \#5632 Adopt zip215 `ed25519` verification. (@marbar3778)
  32. - [privval] \#5603 Add `--key` to `init`, `gen_validator`, `testnet` & `unsafe_reset_priv_validator` for use in generating `secp256k1` keys.
  33. - [abci/client] \#5673 `Async` requests return an error if queue is full (@melekes)
  34. - [mempool] \#5673 Cancel `CheckTx` requests if RPC client disconnects or times out (@melekes)
  35. - [abci] \#5706 Added `AbciVersion` to `RequestInfo` allowing applications to check ABCI version when connecting to Tendermint. (@marbar3778)
  36. - [blockchain/v1] \#5728 Remove in favor of v2 (@melekes)
  37. - [blockchain/v0] \#5741 Relax termination conditions and increase sync timeout (@melekes)
  38. - [cli] \#5772 `gen_node_key` output now contains node ID (`id` field) (@melekes)
  39. - [blockchain/v2] \#5774 Send status request when new peer joins (@melekes)
  40. - [consensus] \#5792 Deprecates the `time_iota_ms` consensus parameter, to reduce the bug surface. The parameter is no longer used. (@valardragon)
  41. - [mempool] \#5813 Add `keep-invalid-txs-in-cache` config option. When set to true, mempool will keep invalid transactions in the cache (@p4u)
  42. ### BUG FIXES
  43. - [types] \#5523 Change json naming of `PartSetHeader` within `BlockID` from `parts` to `part_set_header` (@marbar3778)
  44. - [privval] \#5638 Increase read/write timeout to 5s and calculate ping interval based on it (@JoeKash)
  45. - [blockchain/v1] [\#5701](https://github.com/tendermint/tendermint/pull/5701) Handle peers without blocks (@melekes)
  46. - [crypto] \#5707 Fix infinite recursion in string formatting of Secp256k1 keys (@erikgrinaker)
  47. - [blockchain/v1] \#5711 Fix deadlock (@melekes)
  48. - [mempool] \#5800 Disable `max-batch-bytes` (@melekes)