Opened 5 years ago

Closed 5 years ago

#4545 closed defect (fixed)

Direct-leak · lwcollection_construct

Reported by: komzpa Owned by: pramsey
Priority: medium Milestone: PostGIS 3.1.0
Component: postgis Version: master
Keywords: Cc:

Description

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

	==1==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x496abd in malloc /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x606460 in lwcollection_construct /src/postgis/liblwgeom/lwcollection.c:78:8
    #2 0x618083 in wkt_parser_collection_new /src/postgis/liblwgeom/lwin_wkt.c:717:8
    #3 0x671f26 in wkt_yyparse /src/postgis/liblwgeom/lwin_wkt_parse.y:252:31
    #4 0x66e032 in lwgeom_parse_wkt /src/postgis/liblwgeom/lwin_wkt_parse.y:68:13
    #5 0x6191f9 in lwgeom_from_wkt /src/postgis/liblwgeom/lwin_wkt.c:909:20
    #6 0x4c9eeb in LLVMFuzzerTestOneInput /src/postgis/fuzzers/wkt_import_fuzzer.cpp:120:26
    #7 0x51a716 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15
    #8 0x4cb25f in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/libfuzzer/FuzzerDriver.cpp:292:6
    #9 0x4d8ec2 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:774:9
    #10 0x4ca8a7 in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #11 0x7f857f24882f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/libc-start.c:291

Attachments (1)

clusterfuzz-testcase-minimized-wkt_import_fuzzer-5663684969365504 (375 bytes ) - added by komzpa 5 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by komzpa, 5 years ago

Milestone: PostGIS 2.5.4PostGIS 3.1.0
Version: 2.5.xtrunk

comment:3 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.