Bug 1450030 - Unhandled errors, dereferencing NULL pointer
Summary: Unhandled errors, dereferencing NULL pointer
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.171
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: David Teigland
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 12:16 UTC by Marian Csontos
Modified: 2023-08-10 15:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Marian Csontos 2017-05-11 12:16:15 UTC
Coverity reports few new errors in tools/command.c:

1. add_oo_definition_line and append_oo_definition_line return void on errors. It is possible lvm build would end up with incomplete option parsing.

2. add_oo_definition_line is dereferencing potentially NULL pointer oo->name.

Yes, there is virtual memory, OOM killer, and the generator would most likely segfault under that conditions anyway...

Comment 1 David Teigland 2017-05-11 15:35:20 UTC
Thanks, there is also other validation that should be done when parsing the command defs, which wasn't necessary when the cmd defs were generated at build time rather than at run time.  Also needed are checks that options are specified with the correct value types, and at the end checks for duplicate or equivalent command defs.


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