Bug #1284
closedUST consumer daemon should handle SIGBUS
100%
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.
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.
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
Updated by Mathieu Desnoyers over 3 years ago
- Project changed from LTTng-tools to LTTng
Updated by Mathieu Desnoyers almost 3 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset lttng-tools:lttng-tools|881fc67f7002469477a5ad00e67a8077db6c0514.