Mtasa-blue: Some codes that crash mta

Created on 17 Oct 2018  路  4Comments  路  Source: multitheftauto/mtasa-blue

Describe the bug
Source: https://www.lua.org/bugs.html
Following code crashing mta. tested clientside

To reproduce
1.

local s = string.rep("\n", 2^24)
print(load(function () return s end))

offset: 0x0034E9B4

2.

function crash(depth)
  local init = '\27\76\117\97\81\0\1\4\4\4\8\0\7\0\0\0\61\115\116' ..
               '\100\105\110\0\1\0\0\0\1\0\0\0\0\0\0\2\2\0\0\0\36' ..
               '\0\0\0\30\0\128\0\0\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0' ..
               '\1\0\0\0\0\0\0\2'
  local mid = '\1\0\0\0\30\0\128\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0'
  local fin = '\0\0\0\0\0\0\0\2\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\2\0' ..
              '\0\0\97\0\1\0\0\0\1\0\0\0\0\0\0\0'
  local lch = '\2\0\0\0\36\0\0\0\30\0\128\0\0\0\0\0\1\0\0\0\0\0\0' ..
              '\0\1\0\0\0\1\0\0\0\0\0\0\2'
  local rch = '\0\0\0\0\0\0\0\2\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\2\0' ..
              '\0\0\97\0\1\0\0\0\1'
  for i=1,depth do lch,rch = lch..lch,rch..rch end
  loadstring(init .. lch .. mid .. rch .. fin)
end
for i=1,25 do print(i); crash(i) end

Offset = 0x0034E9B4

Expected behaviour
Don't crash pls

Screenshots
/

Version
Newest, any version

Additional context
/

bug

Most helpful comment

I mean really.
I don't think fixing those crashes is really important..

All 4 comments

I mean really.
I don't think fixing those crashes is really important..

Are there any real world scenarios that cause this kind of crashes?

only purposeful crash client side

I suggest to close this then since it's just a malicious code. Unless of course you have some suggestions on how to effectively deal with something like that :)

Edit: I was unable to load the link from first message before, but it works for me now and I see that there are relevant patches there... well, nevermind then :smile:

Was this page helpful?
0 / 5 - 0 ratings