[lttng-dev] [PATCH lttng-tools 00/24] Fix illegal memory accesses

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue May 17 01:42:39 UTC 2016


Coverity found illegal memory accesses around the use of strncpy().
Implement a lttng_strncpy() which performs sanity check with strlen()
first, and fails if the input string is too long to fit in the
destination length.

Mathieu Desnoyers (24):
  Implement lttng_strncpy safe string copy
  Fix: illegal memory access in _cmd_enable_event
  Fix: illegal memory access in init_ust_event_from_agent_event
  Fix: illegal memory access in add_uri_to_consumer
  Fix: illegal memory access in enable_event
  Fix: illegal memory access in disable_event
  Fix: illegal memory access in list_events
  Fix: illegal memory access in cmd_snapshot_list_outputs
  Fix: illegal memory access in consumer_set_network_uri
  Fix: illegal memory access in output_init
  Fix: illegal memory access in cmd_snapshot_record
  Fix: illegal memory access in list_lttng_channels
  Fix: illegal memory access in write_pidfile
  Fix: illegal memory access in syscall_init_table
  Fix: illegal memory access in consumer_set_subdir
  Fix: illegal memory access in session_create
  Fix: illegal memory access in relayd_create_session_2_4
  Fix: illegal memory access in relayd_add_stream
  Fix: illegal memory access in viewer_list_sessions
  Fix: illegal memory access in send_viewer_streams
  Fix: illegal memory access in test_create_ust_channel
  Fix: illegal memory access in test_create_kernel_event
  Fix: illegal memory access in test_create_ust_event
  Fix: illegal memory access in test_create_ust_event_exclusion

 src/bin/lttng-relayd/live.c       | 36 +++++++++++++++++++------
 src/bin/lttng-relayd/session.c    | 19 ++++++++------
 src/bin/lttng-sessiond/agent.c    | 29 ++++++++++++++-------
 src/bin/lttng-sessiond/cmd.c      | 55 ++++++++++++++++++++++++++++++---------
 src/bin/lttng-sessiond/consumer.c | 11 ++++++--
 src/bin/lttng-sessiond/main.c     |  5 +++-
 src/bin/lttng-sessiond/save.c     |  6 ++++-
 src/bin/lttng-sessiond/snapshot.c | 13 ++++++---
 src/bin/lttng-sessiond/syscall.c  |  7 +++--
 src/common/macros.h               | 12 +++++++++
 src/common/relayd/relayd.c        | 23 ++++++++--------
 tests/unit/test_kernel_data.c     |  6 +++--
 tests/unit/test_ust_data.c        | 13 +++++----
 13 files changed, 168 insertions(+), 67 deletions(-)

-- 
2.1.4



More information about the lttng-dev mailing list