Project

General

Profile

Actions

Bug #1929

closed

yaml: ConfYamlHandleInclude memleak

Added by Rainer Weikusat almost 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

The ConfYamlHandleInclude (conf-yaml-loader.c) returns early if either fopening the file to be included fails or if ConfYamlParser signals an error processing it. In the first case, memory allocated to the yaml_parser_t object (parser) is leaked as the yaml_parser_delete function isn't called for it. For the second case, the open stream referring to the include file is additionally left open.


Files

patch (1.2 KB) patch patch (against 3.1.2) Rainer Weikusat, 10/19/2016 12:19 PM
Actions #1

Updated by Victor Julien almost 6 years ago

Hi Rainer, can you follow the contribution guidelines here? https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Contributing

Actions #2

Updated by Rainer Weikusat almost 6 years ago

I found a pretty trivial bug in this code while implementing an additional feature needed for integrating the engine into a certain system. I've reported this and provided trivial patch. I'm not going to try to run 17 paragraphs of legalese trying to hold me personally responsible for every mischief which could occur to the OSIF because of this or that US intellecual property law past the legal department of my employer for this.

Actions #3

Updated by Victor Julien almost 6 years ago

  • Subject changed from ConfYamlHandleInclude leaks memory and possible, a stdio stream if opening or parsing an include file fails to yaml: ConfYamlHandleInclude memleak
  • Status changed from New to Assigned
  • Assignee set to Jason Ish
  • Target version set to 70

Thats fine, we're happy with just bug reports as well.

Actions #4

Updated by Victor Julien about 4 years ago

  • Status changed from Assigned to Closed
  • Target version changed from 70 to 4.1rc1
Actions

Also available in: Atom PDF