Opened 5 years ago

Closed 5 years ago

#4544 closed defect (fixed)

wkb_import_fuzzer: Direct-leak in lwtriangle_construct_empty

Reported by: komzpa Owned by: pramsey
Priority: medium Milestone: PostGIS 3.0.1
Component: postgis Version: 3.0.x
Keywords: Cc:

Description

	==1==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x49692d in malloc /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x603725 in lwtriangle_construct_empty /src/postgis/liblwgeom/lwtriangle.c:60:23
    #2 0x61197c in lwtriangle_from_wkb_state /src/postgis/liblwgeom/lwin_wkb.c:592:20
    #3 0x611f67 in lwcollection_from_wkb_state /src/postgis/liblwgeom/lwin_wkb.c:693:10
    #4 0x61220a in lwgeom_from_wkb /src/postgis/liblwgeom/lwin_wkb.c:833:9
    #5 0x4c9d2d in LLVMFuzzerTestOneInput /src/postgis/fuzzers/wkb_import_fuzzer.cpp:116:22
    #6 0x51a546 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15
    #7 0x4cb08f in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/libfuzzer/FuzzerDriver.cpp:292:6
    #8 0x4d8cf2 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:774:9
    #9 0x4ca6d7 in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #10 0x7f620290a82f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/libc-start.c:291

https://oss-fuzz.com/testcase-detail/5689684272873472

Attachments (1)

clusterfuzz-testcase-minimized-wkb_import_fuzzer-5689684272873472 (22 bytes ) - added by komzpa 5 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 by algunenano, 5 years ago

Resolution: fixed
Status: newclosed

In 17918:

Address leaks detected by OSS-FUZZ

Closes #4544
Closes #4545
Closes https://github.com/postgis/postgis/pull/496

Note: See TracTickets for help on using tickets.