Bug 5299 - investigate libtasn1 memory leak
Summary: investigate libtasn1 memory leak
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client (show other bugs)
Version: pre-1.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 16:48 CEST by Pierre Ossman
Modified: 2014-10-21 10:34 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2014-10-14 16:48:39 CEST
Possible memory leak found in bug 2723:

* libtasn1 leaks some memory, but it might be a one-time thing:

> ==10068== 680 bytes in 5 blocks are definitely lost in loss record 482 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591EBB: _asn1_yyparse (ASN1.y:224)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x438B0B: PKCS11Module::GetTokenCertificates(unsigned long) (tlclient_pkcs11.cc:715)
> ==10068==    by 0x439500: PKCS11Module::GetToken(unsigned long) (tlclient_pkcs11.cc:580)
> ==10068==    by 0x43A01F: PKCS11Module::GetCertificates() (tlclient_pkcs11.cc:364)
> ==10068==    by 0x412946: MainWindow::UpdateCerts() (tlclient_mainwindow.cc:1238)
> ==10068==    by 0x41363A: MainWindow::CheckCerts(void*) (tlclient_mainwindow.cc:1350)
> ==10068== 
> ==10068== 680 bytes in 5 blocks are definitely lost in loss record 483 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591EBB: _asn1_yyparse (ASN1.y:224)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x43760F: PKCS11Module::FindCertificate(std::string) (tlclient_pkcs11.cc:867)
> ==10068==    by 0x437E3F: PKCS11Module::CertificatePresent(std::string) (tlclient_pkcs11.cc:383)
> ==10068==    by 0x40FA6D: MainWindow::DoLogin(std::string, std::string, std::string, std::string, pkcs11_certificate const*, std::string const&, std::string, bool) (tlclient_mainwindow.cc:790)
> ==10068==    by 0x413343: MainWindow::TriggerLogin() (tlclient_mainwindow.cc:648)
> ==10068==    by 0x469642: Fl_Widget::do_callback(Fl_Widget*, void*) (in /opt/thinlinc/lib/tlclient/tlclient.bin)
> ==10068== 
> ==10068== 952 (136 direct, 816 indirect) bytes in 1 blocks are definitely lost in loss record 500 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591A81: _asn1_yyparse (ASN1.y:174)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x438B0B: PKCS11Module::GetTokenCertificates(unsigned long) (tlclient_pkcs11.cc:715)
> ==10068==    by 0x439500: PKCS11Module::GetToken(unsigned long) (tlclient_pkcs11.cc:580)
> ==10068==    by 0x43A01F: PKCS11Module::GetCertificates() (tlclient_pkcs11.cc:364)
> ==10068==    by 0x412946: MainWindow::UpdateCerts() (tlclient_mainwindow.cc:1238)
> ==10068==    by 0x41363A: MainWindow::CheckCerts(void*) (tlclient_mainwindow.cc:1350)
> ==10068== 
> ==10068== 952 (136 direct, 816 indirect) bytes in 1 blocks are definitely lost in loss record 501 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591A81: _asn1_yyparse (ASN1.y:174)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x43760F: PKCS11Module::FindCertificate(std::string) (tlclient_pkcs11.cc:867)
> ==10068==    by 0x437E3F: PKCS11Module::CertificatePresent(std::string) (tlclient_pkcs11.cc:383)
> ==10068==    by 0x40FA6D: MainWindow::DoLogin(std::string, std::string, std::string, std::string, pkcs11_certificate const*, std::string const&, std::string, bool) (tlclient_mainwindow.cc:790)
> ==10068==    by 0x413343: MainWindow::TriggerLogin() (tlclient_mainwindow.cc:648)
> ==10068==    by 0x469642: Fl_Widget::do_callback(Fl_Widget*, void*) (in /opt/thinlinc/lib/tlclient/tlclient.bin)
> ==10068== 
> ==10068== 1,360 bytes in 10 blocks are definitely lost in loss record 525 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591EBB: _asn1_yyparse (ASN1.y:224)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x43760F: PKCS11Module::FindCertificate(std::string) (tlclient_pkcs11.cc:867)
> ==10068==    by 0x437959: PKCS11Module::Sign(std::string, unsigned char const*, unsigned long, unsigned char*, unsigned long*, bool (*)(pkcs11_pin_type, unsigned char*, unsigned long*, void*), void (*)(pkcs11_pin_type, pkcs11_pin_error, void*), void*) (tlclient_pkcs11.cc:419)
> ==10068==    by 0x429848: SSHTunnel::SSHAgentCallback(char const*, unsigned long, char*, unsigned long*, void*) (tlclient_ssh.cc:2182)
> ==10068==    by 0x440765: tcpservices::ConnectionAgent::signRequest(char const*, unsigned int) (service_agent.cc:420)
> ==10068==    by 0x440C24: tcpservices::ConnectionAgent::parseMessage(char const*, unsigned int) (service_agent.cc:294)
> ==10068== 
> ==10068== 1,904 (272 direct, 1,632 indirect) bytes in 2 blocks are definitely lost in loss record 540 of 585
> ==10068==    at 0x4A081D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==10068==    by 0x597C8E: _asn1_add_static_node (parser_aux.c:61)
> ==10068==    by 0x591A81: _asn1_yyparse (ASN1.y:174)
> ==10068==    by 0x592687: asn1_parser2tree (ASN1.y:685)
> ==10068==    by 0x43BC63: pkix_desc (cert.c:1192)
> ==10068==    by 0x43C4F2: cert_parse (cert.c:1216)
> ==10068==    by 0x437302: PKCS11Module::GetTokenCertificate(unsigned long, unsigned long) (tlclient_pkcs11.cc:774)
> ==10068==    by 0x43760F: PKCS11Module::FindCertificate(std::string) (tlclient_pkcs11.cc:867)
> ==10068==    by 0x437959: PKCS11Module::Sign(std::string, unsigned char const*, unsigned long, unsigned char*, unsigned long*, bool (*)(pkcs11_pin_type, unsigned char*, unsigned long*, void*), void (*)(pkcs11_pin_type, pkcs11_pin_error, void*), void*) (tlclient_pkcs11.cc:419)
> ==10068==    by 0x429848: SSHTunnel::SSHAgentCallback(char const*, unsigned long, char*, unsigned long*, void*) (tlclient_ssh.cc:2182)
> ==10068==    by 0x440765: tcpservices::ConnectionAgent::signRequest(char const*, unsigned int) (service_agent.cc:420)
> ==10068==    by 0x440C24: tcpservices::ConnectionAgent::parseMessage(char const*, unsigned int) (service_agent.cc:294)

Note You need to log in before you can comment on or make changes to this bug.