Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1679196 - pcs should not allow {}\n\r characters in corosync.conf values
Summary: pcs should not allow {}\n\r characters in corosync.conf values
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1682129
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-20 15:09 UTC by Tomas Jelinek
Modified: 2019-03-15 17:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1515193
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Tomas Jelinek 2019-02-20 15:09:03 UTC
+++ This bug was initially created as a clone of Bug #1515193 +++

From bz1389209 comment 33:
$ pcs quorum device update model \
  "host=$(printf \
    "localhost\n}\nheuristics {\nexec_bar: /usr/bin/sh -c 'echo reboot>>/root/.profile||:'\n")"

Need to check with corosync parser which characters should be disallowed.

--- Additional comment from Jan Pokorný [poki] on 2017-11-20 15:55:19 CET ---

This is rather urgent for reasons in [bug 1389209 comment 35].

And rather than being matter of corosync parser, it's a general
deficiency in checking the inputs (possibly from less-privileged
sources, depending on the exact use case) to compose the resulting
corosync.conf from, as currently the precooked configuration
snippets may be injected in "plain unlimited string"-evaluated
instances.

--- Additional comment from Tomas Jelinek on 2017-11-20 16:25:37 CET ---

- { anywhere in a line means start of a section -> disallowed
- } anywhere in a line means end of a section -> disallowed
- \n and \r starts a new line which could be used to set its own key-value or section -> disallowed
- : is allowed, as only the first : in a line matters
- # is allowed, as the # only matters when it is the first character in a line (not considering whitespace)
- there is no escaping available

Comment 1 Tomas Jelinek 2019-02-20 15:09:47 UTC
Corosync parser has been updated in corosync3 so we need to recheck it.


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