Skip to content

CheckTx doesn't verify message routing #4639

Closed

Description

Summary of Bug

// CheckTx implements the ABCI interface. It runs the "basic checks" to see
// whether or not a transaction can possibly be executed, first decoding, then
// the ante handler (which checks signatures/fees/ValidateBasic), then finally
// the route match to see whether a handler exists.
//
// NOTE:CheckTx does not run the actual Msg handler function(s).

Currently CheckTx does all of what is stated in its godoc except for verifying a router exists for each message! This isn't a big deal or exploitable, but should be fixed nonetheless. I believe we can do this by simply remove the following from BaseApp#runTx:

	if mode == runTxModeCheck {
		return result
	}

This is because BaseApp#runMsgs already has this check and doesn't execute the matched message handler during CheckTx.

Caught by @gamarin2

Version

b2f8c58


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

T:BugType: Code HygieneGeneral cleanup and restructuring of code to provide clarity, flexibility, and modularity.good first issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions