ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.83k stars 2.01k forks source link

Semicritical issues, memory leaks, undebuggable code, and a request #562

Open sapphonie opened 1 year ago

sapphonie commented 1 year ago

Hello.

Please, either release the engine etc source code for SDK13 and let people fix issues by PRing things, or provide PDBs and fix bugs yourself, per https://github.com/ValveSoftware/source-sdk-2013/issues/65. The "security concerns" that are stated in that PR are completely moot - cheaters have already pillaged this engine with reverse engineering and the 2020 code leak - it can not possibly get any worse than it already is. And, on the off chance that it does, I'd be happy to PR plenty of exploit fixes / cheat mitigation to this project, public domain, free of charge.

The lack of support of this abandoned black-box'd project from Valve is very frustrating. I should not have to be a skilled reverse engineer, devops person, AND a skilled coder to get this engine working in a vaguely modern way, e.g. GCC 9, C++17, MSVC 22, https://sentry.io crash reporting, crash dissection, undefined behavior finding, address sanitizing, etc etc etc. I've had to implement significant live (as in on game boot) reverse engineering (e.g. detouring and bytepatching) to fix several bugs, some of them being security issues for users, or otherwise critical, game ruining, server wrecking, etc.

Valve was built on modding, please don't let the official development kit for one of the best engines ever made be complete abandonware.

Here are a few bugs that should probably be fixed or looked at.

Previously reported on HackerOne, never fixed:

Not previously reported;

320386639 errors in context 1763 of 2237:
Conditional jump or move depends on uninitialised value(s)
   at 0x5C2A2E0: SendTable_CalcDelta(SendTable const*, void const*, int, void const*, int, int*, int, int) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCE26A: SV_PackEntity(int, edict_t*, ServerClass*, CFrameSnapshot*) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CD0154: CParallelProcessor<PackWork_t, CFuncJobItemProcessor<PackWork_t> >::Run(PackWork_t*, unsigned int, int, IThreadPool*) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCF066: PackEntities_Normal(int, CGameClient**, CFrameSnapshot*) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCF606: SV_ComputeClientPacks(int, CGameClient**, CFrameSnapshot*) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCBD15: CGameServer::SendClientMessages(bool) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCC010: SV_SendClientUpdates(bool, bool) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5CCC1D6: SV_Frame(bool) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5C42226: _Host_RunFrame_Server(bool) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5C42F40: _Host_RunFrame(float) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5C43A97: Host_RunFrame(float) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
   by 0x5C509C0: CHostState::State_Run(float) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)
 Uninitialised value was created by a stack allocation
   at 0x5CCE026: SV_PackEntity(int, edict_t*, ServerClass*, CFrameSnapshot*) (in /home/sappho/sdkdev/tf2cTEST/sdk2013/bin/engine_srv.so)

Apologies for posting links to reverse engineered detours and binary patches. I know reversing is against Steam's TOS etc, but I would prefer to not expose my players to malformed / insecure / buggy code, if I can help it.

Hope I can be of some help to Valve, or at the bare minimum illuminate some arcane issues for other SDK13 developers to avoid/fix, god bless their souls.

Thanks Sappho

sour-dani commented 1 year ago

Please valve. Please help us!

Rykita commented 1 year ago

feels bad seeing all this effort that Valve will never even consider because they basically give 0 fucks about modding nowadays.