![]() |
Исправляет https://www.blast.hk/threads/216813/
GitHub - atomlin-git/srv-crashfix: corrects the possibility crash samp 0.3.7 servers with incorrect read_bits size corrects the possibility crash samp 0.3.7 servers with incorrect read_bits size - atomlin-git/srv-crashfix github.com thanks @Sargon |
всё проще намного, povargek зальет фикс думаю, т.к. пошел по рукам.
|
Цитата:
то что было в самом крашере - видимо просто запутать |
Цитата:
|
А сигнатуры у тебя под какую версию сделаны? Крашит на первом же нормальном пакете (при подключении)
Код: Код:
[24/07/2024 21:18:17] [debug] Server crashed due to an unknown error |
Цитата:
|
Цитата:
Цитата:
С++: Код:
bool __fastcall read_bits(void* ptr, unsigned char* output, int num_to_read, bool align_to_read) { // , void* edx@atomlin |
У меня плагин не загружается даже, и не знаю что приложить к этому сообщению
cl : командная строка error D8016: несовместимые параметры командной строки "/O2" и "/RTC1" [C:\Users\Vladislav\srv-cr ashfix\scf.vcxproj] |
@atomlin стоит проверить это все: https://github.com/SLikeSoft/SLikeNe...ab949ba038b5ab
говорят доблят сервы и с плагином |
Цитата:
Цитата:
|
Исправление также доступно в open.mp.
- fixed multiple security vulnerabilities in the BitStream class · openmultiplayer/RakNet@021dd2f Our own modification of RakNet used in open.mp. Contribute to openmultiplayer/RakNet development by creating an account on GitHub. github.com Еще один повод мигрировать! |
Failed (/lib/libc.so.6: version GLIBC_2.33' not found (required by plugins/libscf.so)) - Как исправить?
|
всмисле а как его залить там нету плагина или инклуда
|
Цитата:
|
Цитата:
|
Цитата:
|
Возможно сделать фикс с помощю pawn raknet?
|
@atomlin все же это действительно так, добрались и до моего
[25/07/2024 00:01:03] [debug] Server crashed due to an unknown error |
Failed (/lib/libc.so.6: version GLIBC_2.33' not found (required by plugins/libscf.so)) - Как исправить?
|
а как его залить если там нет плагина компилировать штоли?
|
Возможно сделать фикс с помощю pawn raknet?
|
@atomlin как его залить его надо через визуал студио код компилить?
|
Цитата:
|
ИНУСТРУКЦИЯ ДЛЯ Linux серверов.
Подключаетесь к хостингу по ssh или запускаете на виртуалке тот дистрибутив линукса, на котором у вас стоит сервер. Далее скачиваете git и cmake (вероятнее всего для вас это будет команда sudo apt install git, sudo apt install cmake). Далее скачиваем репозиторий с помощью команды git clone https://github.com/atomlin-git/srv-crashfix.git Переходим в него с помощью команды cd srv-crashfix Создаём папку build, с помощью команды mkdir build заходим в папку cd build собираем проект с помощью cmake: cmake .. компилируем проект make проект собран |
Цитата:
-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done You have called ADD_LIBRARY for library scf without any source files. This typically indicates a problem with your CMakeLists.txt file -- Configuring done -- Generating done -- Build files have been written to: /root/srv-crashfix root@vds-97946:~/srv-crashfix# cmake: cmake .. -bash: cmake:: command not found root@vds-97946:~/srv-crashfix# make Scanning dependencies of target scf [ 50%] Building CXX object CMakeFiles/scf.dir/source/main.cpp.o In file included from /usr/include/dlfcn.h:22:0, from /root/srv-crashfix/includes/urmem.hpp:32, from /root/srv-crashfix/includes/headers.hpp:3, from /root/srv-crashfix/source/main.cpp:1: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. CMakeFiles/scf.dir/build.make:62: recipe for target 'CMakeFiles/scf.dir/source/main.cpp.o' failed make[2]: *** [CMakeFiles/scf.dir/source/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/scf.dir/all' failed make[1]: *** [CMakeFiles/scf.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 root@vds-97946:~/srv-crashfix# cd build root@vds-97946:~/srv-crashfix/build# make Scanning dependencies of target scf [ 50%] Building CXX object CMakeFiles/scf.dir/source/main.cpp.o In file included from /usr/include/dlfcn.h:22:0, from /root/srv-crashfix/includes/urmem.hpp:32, from /root/srv-crashfix/includes/headers.hpp:3, from /root/srv-crashfix/source/main.cpp:1: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. CMakeFiles/scf.dir/build.make:62: recipe for target 'CMakeFiles/scf.dir/source/main.cpp.o' failed make[2]: *** [CMakeFiles/scf.dir/source/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/scf.dir/all' failed make[1]: *** [CMakeFiles/scf.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 root@vds-97946:~/srv-crashfix/build# make [ 50%] Building CXX object CMakeFiles/scf.dir/source/main.cpp.o In file included from /usr/include/dlfcn.h:22:0, from /root/srv-crashfix/includes/urmem.hpp:32, from /root/srv-crashfix/includes/headers.hpp:3, from /root/srv-crashfix/source/main.cpp:1: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. CMakeFiles/scf.dir/build.make:62: recipe for target 'CMakeFiles/scf.dir/source/main.cpp.o' failed make[2]: *** [CMakeFiles/scf.dir/source/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/scf.dir/all' failed make[1]: *** [CMakeFiles/scf.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 что делать |
Цитата:
|
Цитата:
|
Цитата:
|
Цитата:
|
Цитата:
|
Автору на заметку: всегда собирай статик в условиях сампа
|
с этим фиксом можно крашить любыми пакетами с любыми данными, для этого нужно всего лишь пофлудить пакетами. но можно ничего и не делать, сервер сам крашнется. это из-за того, что хук в urmem туда-сюда перезаписывает инструкции при вызове оригинальной функции, а ReadBits вызывается из разных потоков и очень часто, в какой-то момент она вызовется с невалидными инструкциями в прологе в результате датарейса. для исправления надо заменить хуки на нормальные, например subhook, или сделать нормальный фикс, вместо хука пропатчив байт 0x7E по адресу 0x0804CE76 (linux 0.3.7-r2-1) на 0x76 (инструкцию jle на jbe).
а так можно пропатчить бинарник линукс сервера любой версии: Код:
xxd -p -c0 samp03svr | sed 's/\(7e098b470801f03b07\)7e/\176/' | xxd -p -r > samp03svr_patched |
Цитата:
|
Цитата:
Пока одна проблема - хостер MyArena не позволяет подгрузить свой samp03svr на сервер, придётся ждать пока они проснуться... |
Solución usando Pawn.RakNet
Pawn.RakNet: [CODE] IRawPacket : 20 ( playerid , BitStream : bs ) // 20 = ID_RPC { new PacketID , RPC_ID , NumberOfBitsOfData ; BS_ReadValue ( bs , PR_UINT8 , PacketID , PR_UINT8 , RPC_ID , PR_CUINT32 , NumberOfBitsOfData ) ; printf ( "IRawPacket -> ID_RPC: playerid: %d, RPC_ID: %d, NumberOfBitsOfData: %d" , playerid , RPC_ID , NumberOfBitsOfData ) ; if ( PacketID == 40 || ( NumberOfBitsOfData >= 0x1FFFFF || NumberOfBitsOfData |
Цитата:
|
Цитата:
|
[QUOTE="Benjes"]
Solución usando Pawn.RakNet Pawn.RakNet: [CODE] IRawPacket : 20 ( playerid , BitStream : bs ) // 20 = ID_RPC { new PacketID , RPC_ID , NumberOfBitsOfData ; BS_ReadValue ( bs , PR_UINT8 , PacketID , PR_UINT8 , RPC_ID , PR_CUINT32 , NumberOfBitsOfData ) ; printf ( "IRawPacket -> ID_RPC: playerid: %d, RPC_ID: %d, NumberOfBitsOfData: %d" , playerid , RPC_ID , NumberOfBitsOfData ) ; if ( PacketID == 40 || ( NumberOfBitsOfData >= 0x1FFFFF || NumberOfBitsOfData |
[QUOTE="Benjes"]
Solución usando Pawn.RakNet Pawn.RakNet: [CODE] IRawPacket : 20 ( playerid , BitStream : bs ) // 20 = ID_RPC { new PacketID , RPC_ID , NumberOfBitsOfData ; BS_ReadValue ( bs , PR_UINT8 , PacketID , PR_UINT8 , RPC_ID , PR_CUINT32 , NumberOfBitsOfData ) ; printf ( "IRawPacket -> ID_RPC: playerid: %d, RPC_ID: %d, NumberOfBitsOfData: %d" , playerid , RPC_ID , NumberOfBitsOfData ) ; if ( PacketID == 40 || ( NumberOfBitsOfData >= 0x1FFFFF || NumberOfBitsOfData |
Цитата:
Цитата:
|
| Время: 02:41 |