Bug #721
closedExclusion of '/../' should occur earlier during trace creation
100%
Description
Consider this:
$ lttng create stupid/../stupider Session stupid/../stupider created. Traces will be written in /home/daniel/lttng-traces/stupid/../stupider-20140117-140634 $ lttng enable-event -u -a All UST events are enabled in channel channel0 $ lttng start Tracing started for session stupid/../stupider Error: Using '/../' is not permitted in the trace path (/home/daniel/lttng-traces/stupid/..) Error: Trace directory creation error
Or this:
$ lttng create stupid/../stupider -U net://131.132.32.77 Session stupid/../stupider created. Traces will be written in net://131.132.32.77 $ lttng enable-event -u -a All UST events are enabled in channel channel0 $ lttng start Tracing started for session stupid/../stupider Error: Relayd add stream replied error 11 Error: Using '/../' is not permitted in the trace path (/home/daniel/lttng-traces/stupid/..) Error: Trace directory creation error
Clearly in both cases the session name should have been vetted by the trace path validator as soon as lttng create
was issued. Note also how, in the second example, the error message makes no sense (it refers to a local path that was not going to be used).
Updated by David Goulet almost 11 years ago
- Status changed from New to Confirmed
Oh! this is actually pretty bad since with the session name being a "path", when we send it to the relayd, we create a tracing path which of course contains the session name but here interpreted as a path....
Fortunately, our trace path validation denies ../ but that could have been quite the security issue here!
Updated by David Goulet almost 11 years ago
- Priority changed from Normal to High
- Target version set to 2.3
Updated by David Goulet almost 11 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset 1c1c3634276842a00492e24c3adcf847ae21edc3.
Updated by Daniel U. Thibault almost 11 years ago
I tried using \u002f
and \x2f
in the session name. It seems fine, the characters never get realised as '/'.