Bug 18190 – [asan] heap-buffer-overflow in Module.load.checkModFileAlias

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-01-03T22:19:13Z
Last change time
2021-03-03T03:52:07Z
Keywords
ice
Assigned to
No Owner
Creator
Martin Nowak

Attachments

IDFilenameSummaryContent-TypeSize
1674asan.logASan logtext/x-log4746

Comments

Comment #0 by code — 2018-01-03T22:19:13Z
Created attachment 1674 ASan log Occured while running compilable/test16798.d. ================================================================= ==13718==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000005a80 at pc 0x000000f54b01 bp 0x7fff48b01170 sp 0x7fff48b00920 READ of size 21 at 0x602000005a80 thread T0 #0 0xf54b00 in __interceptor_memcmp.part.76 /build/src/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:773 #1 0xb12fb8 in _D3dmd7dmodule6Module4loadRS3dmd7globals3LocPS3dmd4root5array40__T5ArrayTC3dmd10identifier10IdentifierZ5ArrayC3dmd10identifier10IdentifierZ17checkModFileAliasMFNbPxaZv (/home/dawg/Code/D/DPL/dmd/generated/linux/release/64/dmd+0xb12fb8) #2 0xb126cc in Module::load(Loc, Array<Identifier*>*, Identifier*) (/home/dawg/Code/D/DPL/dmd/generated/linux/release/64/dmd+0xb126cc) ... 0x602000005a80 is located 0 bytes to the right of 16-byte region [0x602000005a70,0x602000005a80) allocated by thread T0 here: #0 0xf7cab8 in malloc /build/src/compiler-rt/lib/asan/asan_malloc_linux.cc:67 #1 0xecbf76 in Mem::xrealloc(void*, unsigned long) (/home/dawg/Code/D/DPL/dmd/generated/linux/release/64/dmd+0xecbf76) #2 0x8e8e15 in Import::load(Scope*) (/home/dawg/Code/D/DPL/dmd/generated/linux/release/64/dmd+0x8e8e15) ==============================
Comment #1 by bugzilla — 2018-01-04T08:44:37Z
Comment #2 by github-bugzilla — 2018-01-04T11:24:40Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/959f39ff3d3d987fef081e836e93d1cb99c0886f fix Issue 18190 - [asan] heap-buffer-overflow in Module.load.checkModFileAlias https://github.com/dlang/dmd/commit/7ddec7d16804cb9834cc2227bb0bb3c11f0b67c8 Merge pull request #7593 from WalterBright/fix18190 fix Issue 18190 - [asan] heap-buffer-overflow in Module.load.checkMod… merged-on-behalf-of: Mike Franklin <[email protected]>
Comment #3 by dlang-bot — 2021-03-03T03:52:07Z
dlang/dmd pull request #12247 "fix Issue 18190 - [asan] heap-buffer-overflow in Module.load.checkModFileAlias" was merged into dmd-cxx: - e35b86faf8d8a484fd338c7a0d6c0b34c4afa0bb by Walter Bright: fix Issue 18190 - [asan] heap-buffer-overflow in Module.load.checkModFileAlias https://github.com/dlang/dmd/pull/12247