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

Chat commands (and by extension many more commands) bypass sv_cheats #1314

Closed
lvaness opened this issue Apr 30, 2021 · 1 comment
Closed
Assignees
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Size: Small Something that may take a day at most to do. Type: Bug Something that should work/look one way isn't quite doing that. Where: Game This is something for the main game code.

Comments

@lvaness
Copy link
Member

lvaness commented Apr 30, 2021

Describe the bug
Chat commands will execute certain concommands through IVEngineClient::ClientCmd. Some of these commands will accept parameters. Since these are not sanitized, you can chain a second command by appending ;<command> to the parameter.

These commands are not checked against sv_cheats, however, allowing you to execute some protected commands. It appears only GAMEDLL-flagged concommands work. I didn't find a way to change cvars since you need to add spaces for the parameters but I'm sure there's a way.

To Reproduce

  • Launch a map without sv_cheats on
  • Open chat
  • Enter /spec *nullptr;cast_hull and submit
  • See the raycasted hull
  • Now try again in console
  • See sv_cheats warning

Expected behavior
At least, it should verify sv_cheats, even if parameters remain executable. Still, there should probably be some sanitization.

Desktop/Branch (please complete the following information):

  • OS: Linux
  • Branch: 0.8.8 as of April push

Additional context
This is also apparent because /triggers works from chat but not from console. Since we do want that to be available anyways, it's not an issue though (same for the other chat commands). You can enable noclip this way but it has its own safeguard, stopping the timer, which makes it pretty useless. Finding a proper abuse scenario is left as an exercise to the reader.

@lvaness lvaness added the Type: Bug Something that should work/look one way isn't quite doing that. label Apr 30, 2021
@Gocnak Gocnak added Priority: High Something essential that should be done in this release, as soon as possible. Size: Small Something that may take a day at most to do. Where: Game This is something for the main game code. labels May 7, 2021
@Gocnak Gocnak self-assigned this May 7, 2021
@Gocnak Gocnak added this to To Do in 0.9.0 Release via automation May 7, 2021
@Gocnak Gocnak removed their assignment May 16, 2021
@lvaness lvaness self-assigned this May 16, 2021
@Gocnak Gocnak moved this from To Do to In Progress in 0.9.0 Release May 17, 2021
@Gocnak Gocnak added the Blocked: Needs testing & verification Needs testing and verification if properly fixed. label May 21, 2021
@patrickmoc
Copy link
Member

chat command parameters appear to be sanitized properly as of the most recent update.

@lvaness lvaness closed this as completed May 30, 2021
0.9.0 Release automation moved this from In Progress to Done May 30, 2021
@lvaness lvaness added Outcome: Resolved This was resolved, and will be in a future update. and removed Blocked: Needs testing & verification Needs testing and verification if properly fixed. labels May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Size: Small Something that may take a day at most to do. Type: Bug Something that should work/look one way isn't quite doing that. Where: Game This is something for the main game code.
Projects
No open projects
0.9.0 Release
  
Done
Development

No branches or pull requests

3 participants