Skip to content
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

fix: nil pointer panic on NewIntFromBigInt (backport #9627) #9634

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 5, 2021

This is an automatic backport of pull request #9627 done by Mergify.
Cherry-pick of 7f90374 has failed:

On branch mergify/bp/release/v0.42.x/pr-9627
Your branch is up to date with 'origin/release/v0.42.x'.

You are currently cherry-picking commit 7f9037490.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   types/int.go
	modified:   types/int_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

(cherry picked from commit 7f90374)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot added the conflicts label Jul 5, 2021
@amaury1093 amaury1093 added this to the v0.42.7 milestone Jul 5, 2021
@tomtau
Copy link
Contributor

tomtau commented Jul 6, 2021

is this a consensus-breaking change?

@tac0turtle
Copy link
Member

is this a consensus-breaking change?

I believe so, at least it is client side breaking. @fedekunze can you test on a live chain?

@alexanderbez
Copy link
Contributor

is this a consensus-breaking change?

Ehh that's difficult to say. What would once panic, would now error. So I suppose technically yes, but I think we can get this in w/o calling it state-breaking.

@tomtau
Copy link
Contributor

tomtau commented Jul 7, 2021

Ehh that's difficult to say. What would once panic, would now error. So I suppose technically yes, but I think we can get this in w/o calling it state-breaking.

assuming NewIntFromBigInt gets called in tx deserialization and one manages to smuggle in (i.e. propose a block that includes this tx) a tx with a payload where this manifests... how will this differ during DeliverTX / runTx processing with and without this patch given the panic recovery middleware (or will it even reach that DeliverTX / runTx stage? won't the nodes without this patch just fail to sign on those messages, i.e. it's a potential DoS?)?

@tomtau
Copy link
Contributor

tomtau commented Jul 7, 2021

assuming NewIntFromBigInt gets called in tx deserialization

this doesn't seem to be the case in SDK though -- I only see it gets called in Dec's TruncateInt and RoundInt which shouldn't pass in nil pointers (given Dec is constructed with NewDec etc.), but it'd be good to double check

@alexanderbez
Copy link
Contributor

We can/should be safe here and just call this state machine breaking. Other apps may be calling this in their message execution path.

@amaury1093
Copy link
Contributor

We can/should be safe here and just call this state machine breaking.

In this case I wouldn't backport it to a 0.42 patch release. I'm closing this then.

@amaury1093 amaury1093 closed this Jul 9, 2021
@mergify mergify bot deleted the mergify/bp/release/v0.42.x/pr-9627 branch July 9, 2021 09:11
@amaury1093 amaury1093 removed this from the v0.42.7 milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants