Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#4534 closed defect (fixed)

lwcircstring direct leak in wkb parser

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

Description

=================================================================
==1==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 72 byte(s) in 3 object(s) allocated from:
    #0 0x49692d in malloc /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x6616cb in ptarray_construct_empty /src/postgis/liblwgeom/ptarray.c:61:19
    #2 0x66165e in ptarray_construct /src/postgis/liblwgeom/ptarray.c:53:19
    #3 0x611060 in lwcircstring_from_wkb_state /src/postgis/liblwgeom/lwin_wkb.c:479:19
    #4 0x611a7b in lwcurvepoly_from_wkb_state /src/postgis/liblwgeom/lwin_wkb.c:619:10
    #5 0x611eda in lwgeom_from_wkb /src/postgis/liblwgeom/lwin_wkb.c:783:9
    #6 0x4c9d2d in LLVMFuzzerTestOneInput /src/postgis/fuzzers/wkb_import_fuzzer.cpp:116:22
    #7 0x51a546 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15
    #8 0x4cb08f in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/libfuzzer/FuzzerDriver.cpp:292:6
    #9 0x4d8cf2 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:774:9
    #10 0x4ca6d7 in main /src/libfuzzer/FuzzerMain.cpp:19:10

Attachments (1)

clusterfuzz-testcase-minimized-wkb_import_fuzzer-5708157145317376 (36 bytes ) - added by komzpa 5 years ago.

Download all attachments as: .zip

Change History (7)

comment:3 by Raul Marin, 5 years ago

Resolution: fixed
Status: newclosed

In 17892:

Fix leak in lwcurvepoly_from_wkb_state

Closes #4534
Closes https://github.com/postgis/postgis/pull/492

comment:4 by Raul Marin, 5 years ago

In 17894:

Fix leak in lwcurvepoly_from_wkb_state

References #4534

comment:5 by Raul Marin, 5 years ago

In 17895:

Fix leak in lwcurvepoly_from_wkb_state

References #4534

comment:6 by Raul Marin, 5 years ago

In 17896:

Fix leak in lwcurvepoly_from_wkb_state

References #4534

Note: See TracTickets for help on using tickets.