Project

General

Profile

Bug #1284

UST consumer daemon should handle SIGBUS

Added by Mathieu Desnoyers about 2 months ago. Updated about 1 month 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.

#1

Updated by Mathieu Desnoyers about 2 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.

#2

Updated by Mathieu Desnoyers about 2 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

#3

Updated by Mathieu Desnoyers about 1 month ago

  • Project changed from LTTng-tools to LTTng

Also available in: Atom PDF