Skip to content

global-buffer-overflow on address #1990

@Martinfx

Description

@Martinfx

Hi,
i tested last commit in repo: 756cbb9

==69658==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00080640a8a7 at pc 0x0008065cb974 bp 0x7fffffff9e20 sp 0x7fffffff9e18
READ of size 4 at 0x00080640a8a7 thread T0
    #0 0x0008065cb973  (/usr/local/lib/xrLuaJIT.so+0x18a973)
    #1 0x0008064a9fc7 in lua_pushstring (/usr/local/lib/xrLuaJIT.so+0x68fc7)
    #2 0x000806425586  (/usr/local/lib/xrLuabind.so+0x2a586)
    #3 0x000806425277 in luabind::detail::class_registry::class_registry(lua_State*) (/usr/local/lib/xrLuabind.so+0x2a277)
    #4 0x0008064375de in luabind::open(lua_State*) (/usr/local/lib/xrLuabind.so+0x3c5de)
    #5 0x0008063b55cc in CScriptEngine::init(void (*)(lua_State*), bool) (/usr/local/lib/xrScriptEngine.so+0xa05cc)
    #6 0x000800b5820d in xray::render::render_gl::CResourceManager::LS_Load() (/usr/local/lib/xrRender_GL.so+0x75820d)
    #7 0x000800982d32 in xray::render::render_gl::CResourceManager::OnDeviceCreate(IReader*) (/usr/local/lib/xrRender_GL.so+0x582d32)
    #8 0x000800983574 in xray::render::render_gl::CResourceManager::OnDeviceCreate(char const*) (/usr/local/lib/xrRender_GL.so+0x583574)
    #9 0x00080080d0f9 in xray::render::render_gl::D3DXRenderBase::OnDeviceCreate(char const*) (/usr/local/lib/xrRender_GL.so+0x40d0f9)
    #10 0x0008059892c1 in CRenderDevice::Create() (/usr/local/lib/xrEngine.so+0x22e2c1)
    #11 0x0008059567d6 in CApplication::CApplication(char const*, GameModule*, std::__1::array<RendererModule*, 2ul> const&) (/usr/local/lib/xrEngine.so+0x1fb7d6)
    #12 0x0000002f4b26 in main (/usr/local/bin/xr_3da+0x2f4b26)
    #13 0x000805f2be33 in __libc_start1 /usr/src/lib/libc/csu/libc_start1.c:157:7
    #14 0x00000024d313 in _start (/usr/local/bin/xr_3da+0x24d313)

0x00080640a8a7 is located 57 bytes before global variable '.str.6' defined in '/usr/ports/games/xray-16/work/xray-16-756cbb947a7f1279e6117a92e33c497dd485b89f/Externals/luabind/src/class_registry.cpp' (0x00080640a8e0) of size 11
  '.str.6' is ascii string '__newindex'
0x00080640a8a7 is located 25 bytes before global variable '.str.5' defined in '/usr/ports/games/xray-16/work/xray-16-756cbb947a7f1279e6117a92e33c497dd485b89f/Externals/luabind/src/class_registry.cpp' (0x00080640a8c0) of size 8
  '.str.5' is ascii string '__index'
0x00080640a8a7 is located 0 bytes after global variable '.str.4' defined in '/usr/ports/games/xray-16/work/xray-16-756cbb947a7f1279e6117a92e33c497dd485b89f/Externals/luabind/src/class_registry.cpp' (0x00080640a8a0) of size 7
  '.str.4' is ascii string '__call'
SUMMARY: AddressSanitizer: global-buffer-overflow (/usr/local/lib/xrLuaJIT.so+0x18a973) 
Shadow bytes around the buggy address:
  0x00080640a600: 00 00 00 00 00 00 02 f9 f9 f9 f9 f9 00 00 00 00
  0x00080640a680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00080640a700: 00 00 00 00 00 00 00 00 02 f9 f9 f9 00 02 f9 f9
  0x00080640a780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00080640a800: 00 00 02 f9 f9 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9
=>0x00080640a880: 05 f9 f9 f9[07]f9 f9 f9 00 f9 f9 f9 00 03 f9 f9
  0x00080640a900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00080640a980: 00 00 00 00 00 07 f9 f9 f9 f9 f9 f9 00 00 05 f9
  0x00080640aa00: f9 f9 f9 f9 00 00 07 f9 f9 f9 f9 f9 06 f9 f9 f9
  0x00080640aa80: 07 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9 00 03 f9 f9
  0x00080640ab00: 06 f9 f9 f9 06 f9 f9 f9 06 f9 f9 f9 06 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==69658==ABORTING

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThe issue in the run-time.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions