Project

General

Profile

Actions

Bug #1284

open

UST consumer daemon should handle SIGBUS

Added by Mathieu Desnoyers 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
10/09/2020
Due date:
% Done:

0%

Estimated time:

Description

There is an issue with the security model of lib ring buffer (lttng-ust) vs SIGBUS handling by consumer daemon. We do not trap SIGBUS in the consumer daemon. An application using ftruncate on a ring buffer shm could cause the consumer to be killed with SIGBUS.

Actions #1

Updated by Mathieu Desnoyers 7 months ago

One possible way to solve this would be to use memfd and fcntl(2) F_ADD_SEALS (only available since Linux 3.17). It would not however cover kernels older than 3.17 (which we support) and would not work for --shm-path, because it only works for memfd.

So handling SIGBUS in the consumer daemon seems like a better approach to solve this.

Actions #2

Updated by Mathieu Desnoyers 7 months ago

Gerrit review for lttng-ust patch: https://review.lttng.org/c/lttng-ust/+/4171
Gerrit review for lttng-tools patch: https://review.lttng.org/c/lttng-tools/+/4172

Actions #3

Updated by Mathieu Desnoyers 7 months ago

  • Project changed from LTTng-tools to LTTng
Actions

Also available in: Atom PDF