Project

General

Profile

Actions

Bug #1284

closed

UST consumer daemon should handle SIGBUS

Added by Mathieu Desnoyers over 3 years ago. Updated almost 3 years ago.

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

100%

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 over 3 years 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 over 3 years 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 over 3 years ago

  • Project changed from LTTng-tools to LTTng
Actions #4

Updated by Mathieu Desnoyers almost 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF