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

kogs: Unrecoverable game tokens from lacking kogslamdata validation #30

Closed
Alrighttt opened this issue Jul 16, 2020 · 2 comments
Closed

Comments

@Alrighttt
Copy link

There is no validation on where the "turn baton" output must be sent to for kogsslamdata.

If a malicious party changes this CC address, it will make the deposited tokens of the game unrecoverable. While attempting to recover deposited tokens from a game like this, you will receive the following error:
CC Eval EVAL_KOGS Error!: invalid oper with game: could not add or remove tokens while game is running spending tx bdf0173c570c640c66e03d7c0c800beec9b5708bcbc7b9640d52fd66c1233f47

This leads to both the slammers and the containers being entirely unrecoverable.

To reproduce this, change kogsPk and/or destpk in the following line prior to doing kogsslamdata.

mtx.vout.push_back(MakeCC1of2vout(EVAL_KOGS, KOGS_BATON_AMOUNT, kogsPk, destpk)); // baton to indicate whose turn is now, globalpk to allow autofinish stalled games

An example of this can be found on the MYKOG chain with gameid, 5951db41a86d096fbb27179b33259b6212e83cbb861515357b5f7ab764938f19. This txid:c70f9ab6fea922ac6c36a4d689f99b74acaa1912d3d805293d84e274722b8cc8 is the malformed kogsslamdata transaction.

@dimxy
Copy link
Owner

dimxy commented Jul 16, 2020

should validate the destpk is one of the player pks

@dimxy
Copy link
Owner

dimxy commented May 25, 2021

archived due to the closed project

@dimxy dimxy closed this as completed May 25, 2021
dimxy pushed a commit that referenced this issue Jan 18, 2022
dimxy pushed a commit that referenced this issue Sep 27, 2022
removed configure check not working on mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants