Vulnerabilities on receiving null commands
#5

Quote:
Originally Posted by leong124
View Post
The server didn't crash on line 87(CallLocalFunction) but on line 92, although the command text is a null string. But it is impossible because you can access the array of an null string, which actually contains (null) in the string. Thus I doubt it can be an invalid memory access.

Even if the index of the string (i.e. A in a_string[A]) is invalid, it will only return a warning of "array index out of boundaries", but not invalid memory access and crash the server.
I will check it later.
According to the logs it was just a runtime error (invalid memory access) on line 92 where it tried to access the out-of-bounds array element, and it crashed later on line 87. It's strange that it crashes on an earlier line but perhaps that's because it doesn't crash when CallLocalFunction is executed, rather when it gets to the receiving function (which presumably takes a few nanoseconds longer).

A "null string" in pawn is exactly the same as a string containing nothing - it's an array with one element, that being zero. Therefore in this case, cmdtext[0] is valid and would contain 0, but cmdtext[1] - which is trying to be accessed - is not.

Indeed it's strange that it's reported as "invalid memory access" rather than out of boundaries but I do believe that's the cause.
Reply


Messages In This Thread
Vulnerabilities on receiving null commands - by leong124 - 22.12.2012, 08:31
Re: Vulnerabilities on receiving null commands - by ev0lution - 22.12.2012, 09:18
Re: Vulnerabilities on receiving null commands - by AndreT - 22.12.2012, 09:24
Re: Vulnerabilities on receiving null commands - by leong124 - 22.12.2012, 09:32
Re: Vulnerabilities on receiving null commands - by ev0lution - 22.12.2012, 09:59
Re: Vulnerabilities on receiving null commands - by Kar - 23.12.2012, 04:22
Re: Vulnerabilities on receiving null commands - by Lorenc_ - 23.12.2012, 07:17
Re: Vulnerabilities on receiving null commands - by leong124 - 26.12.2012, 18:42
Respuesta: Vulnerabilities on receiving null commands - by Jupit3r - 27.12.2012, 12:20
Re: Vulnerabilities on receiving null commands - by Lorenc_ - 27.12.2012, 22:52
Re: Vulnerabilities on receiving null commands - by leong124 - 28.12.2012, 08:16
Re: Vulnerabilities on receiving null commands - by ikkentim - 05.01.2013, 10:00
Re: Vulnerabilities on receiving null commands - by leong124 - 05.01.2013, 11:46
Re: Vulnerabilities on receiving null commands - by mastermax7777 - 06.01.2013, 04:10
Re: Vulnerabilities on receiving null commands - by leong124 - 06.01.2013, 14:19
Re: Vulnerabilities on receiving null commands - by Karlip - 08.01.2013, 15:47
Re: Vulnerabilities on receiving null commands - by leong124 - 08.01.2013, 19:30
Re: Vulnerabilities on receiving null commands - by kurta999 - 08.01.2013, 20:23
Re: Vulnerabilities on receiving null commands - by leong124 - 09.01.2013, 08:06

Forum Jump:


Users browsing this thread: 2 Guest(s)