Validate channel context mismatch across UST applications
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 24 Nov 2021 20:56:16 +0000 (15:56 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Dec 2021 15:19:01 +0000 (10:19 -0500)
commit28dc0326d832142a7b5fe5e31d4ebb5d8c5d745a
tree4cbfb30adfa892558d1fe4297f10463cf169d235
parent17cb7bac747514bcf1bd95f0a3d20b59e02777e6
Validate channel context mismatch across UST applications

Observed issue
==============

Applications traced with LTTng-UST are expected to all provide the exact
same layout for their channel's context fields, else it leads to
corrupted traces. This is only enforced within LTTng-UST. There is
nothing in the session daemon that prevents this scenario, and it is
only observable when reading the corrupted trace.

This makes the entire trace unreadable from the point where it is
corrupted.

Cause
=====

Even though LTTng-UST sends the entire description of its context fields
along with the channel registration notification, there is no validation
of the context fields' content against the context fields present in the
ust registry.

Solution
========

Validate each registered UST channel context fields against the fields
present in the registry. Reject the application if there is a mismatch.

Known drawbacks
===============

None.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8b49032bf4f766e549dfccfafdce8cddcbb2873f
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-field-utils.c
src/bin/lttng-sessiond/ust-field-utils.h
src/bin/lttng-sessiond/ust-registry.c
This page took 0.025821 seconds and 4 git commands to generate.