Go to file
Peace-Maker 15450a6d0c Fix use-after-free when creating custom user messages
When creating our own "owned and local" protobuf message in `StartProtobufMessage`, `m_FakeEngineBuffer` is used to track that message. In `EndMessage` the message is optionally converted to a "private" one with the right abi on osx and passed to the engine's `SendUserMessage`. On linux and windows the same message as in the `m_FakeEngineBuffer` is passed though without conversion. `engine->SendUserMessage` has a vtable hook which sets `m_FakeEngineBuffer` to the passed argument.

`m_FakeEngineBuffer` frees the message it previously held, since it's "owned" from `StartProtobufMessage`, but that's the same one that's passed in as argument so a use-after-free in the engine happens when the now-freed message pointer is forwarded to the real `SendUserMessage` in the engine.

The message created in `StartProtobufMessage` wasn't free'd at all when hooks are blocked too. This fix moves the message buffer into a local variable which is destroyed at the end of the function.

Fixes #1286 and #1296
2020-06-23 10:32:55 -07:00
.github Create FUNDING.yml 2019-05-27 17:15:04 +01:00
bridge/include Rename ke::Lambda to ke::Function. 2020-05-17 12:33:52 -07:00
configs Allow setting multiple chat trigger characters (PR #449, bug 4341, bug 5668) 2016-10-04 16:34:42 +01:00
core Fix use-after-free when creating custom user messages 2020-06-23 10:32:55 -07:00
editor Added AMXX Pawn geshi generation script. 2010-08-23 13:53:44 -04:00
extensions Use more STL for vector insertion/removal. (#1284) 2020-06-13 15:57:02 -07:00
gamedata Update TF2 CanBeAutobalanced gamedata. 2020-06-17 00:50:43 +00:00
licenses Fix quote mismatch (#1092) 2019-09-30 22:43:18 -07:00
loader Revert "Remove arch loops from build scripts. (#889)" 2018-10-04 17:59:40 +00:00
plugins Prevent voteban evading & add ban length cvar (#1249) 2020-06-13 16:00:44 -07:00
public Update SourcePawn and AMTL. 2020-06-01 13:22:29 -07:00
sourcepawn@381bc02811 Update SourcePawn. 2020-06-02 13:33:57 -07:00
tools Change bootstrap.pl and startbuild.pl to also take CXX. (#1280) 2020-05-27 21:18:49 -04:00
translations Standardize some spacing in translation phrases (#1254) 2020-05-08 14:55:05 -07:00
versionlib 64-bit support for CSGO on Linux and macOS (#705) 2017-12-20 01:56:23 -06:00
.arcconfig Add a .arcconfig file so that arc works 2013-10-15 22:57:59 +01:00
.gitattributes NPOTB: Correct GitHub's Linguist inaccuracies (#1096) 2019-10-07 19:14:09 +01:00
.gitignore Update to the latest SourcePawn revision. 2015-08-18 09:51:24 -07:00
.gitmodules Use upstream SourcePawn as a submodule. 2015-03-15 16:38:38 -07:00
.travis.yml Build csgo-x64 on travis. 2020-05-30 22:13:07 -07:00
AMBuildScript Introduce a pbproxy library to solve macOS linker issues. 2020-05-30 22:13:07 -07:00
changelog.txt Triggering a build. 2011-04-13 19:05:41 -05:00
configure.py Add an option to build against no SDKs (#1201) 2020-03-04 21:52:07 +00:00
product.version Bump version to 1.11. 2019-10-18 21:07:36 -07:00
pushbuild.txt Trigger build for hl2sdk-csgo update. 2019-03-28 20:00:20 -04:00
README.md Incorperate Licensing Into Project Tree (#961) 2019-04-12 12:10:13 -07:00

SourceMod

General

Development

Contact

  • Connect with us on GameSurge IRC in #sourcemod
  • Alternatively feel free to join our Discord server

License

SourceMod is licensed under the GNU General Public License version 3. Special exceptions are outlined in the LICENSE.txt file inside of the licenses folder.