Facepunch / garrysmod-issues

Garry's Mod issue tracker
147 stars 56 forks source link

rcon return packet contains junk feedback data on x86-64 branch #5077

Open DBotThePony opened 3 years ago

DBotThePony commented 3 years ago

Every other game and Garry's Mod on stable/dev branch

] rcon status
hostname: DBot's Test Server
version : 2021.06.09/24 8367 secure
udp/ip  : 0.0.0.0:27072  (public ip: 31.220.170.28)
map     : gm_mobenix_v3_final at: 0 x, 0 y, 0 z
players : 0 (128 max)

# userid name                uniqueid            connected ping loss state  adr

Garry's Mod on x86-64 branch

] rcon status
hostname: DBot's Test Server
version : 2021.06.09/24 8376 secure
udp/ip  : 0.0.0.0:27072  (public ip: 31.220.170.28)
map     : gm_mobenix_v3_final at: 0 x, 0 y, 0 z
players : 0 (128 max)

# userid name                uniqueid            connected ping loss state  adr
rcon from "192.168.50.1:1190": command "status"

Notice the rcon from "192.168.50.1:1190": command "status" at the end. It applies to every command executed.

Noticed this when node.js rcon daemon had it's parser going insane when server branch got bumped to x86-64.

jorjic commented 2 years ago

Looks like sv_rcon_log might be enabled for you on x86-64.

Rcon is a liability, you're better off firewalling TCP [server port].

DBotThePony commented 2 years ago

You completely miss the issue here. In TCP packet returning from server, I (the command issuer), receive the rcon from "192.168.50.1:1190": command "status" at the end of response, which shouldn't be there, since response's useful payload should contain only output of the command executed (technically it return all console output excluding the rcon from... message on same server tick).

jorjic commented 2 years ago

I was assuming you were in a situation where you could get the server's stdout in your console or something. sv_rcon_log is enabled by default, so something must be going wrong. Do you get other spew messages, or is it only in this specific case? I don't see anything that would obviously cause this.