Bug 1652612

Summary: There is memory leak at liblas::Open(liblas/liblas.hpp:127) in libLAS.
Product: [Fedora] Fedora Reporter: shuitao gan <ganshuitao>
Component: liblasAssignee: Devrim Gündüz <devrim>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 31CC: devrim, nsl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
./las2pg POC3 none

Description shuitao gan 2018-11-22 13:17:20 UTC
Created attachment 1507938 [details]
./las2pg POC3

version: libLAS2.4
Summary: 

There is memory leak at liblas::Open(liblas/liblas.hpp:127) in libLAS.

Description:

The asan debug is as follows:

$./las2pg POC3
=================================================================
==41016==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 520 byte(s) in 1 object(s) allocated from:
    #0 0x7f94b41c88b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2)
    #1 0x7f94b3f02a37 in liblas::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode) /home/company/real_sanitize/libLAS-master/include/liblas/liblas.hpp:127
    #2 0x7f94b3f02a37 in LASReader_Create /home/company/real_sanitize/libLAS-master/src/c_api.cpp:237

Indirect leak of 8192 byte(s) in 1 object(s) allocated from:
    #0 0x7f94b41c8a32 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99a32)
    #1 0x7f94b276c8a7 in std::basic_filebuf<char, std::char_traits<char> >::_M_allocate_internal_buffer() (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xec8a7)

SUMMARY: AddressSanitizer: 8712 byte(s) leaked in 2 allocation(s).

Comment 1 Nicholas Luedtke 2018-12-31 17:19:51 UTC
This appears to be CVE-2018-20540.

Comment 2 Ben Cotton 2019-08-13 16:59:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Ben Cotton 2019-08-13 19:38:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.