Fix: Properly sanitize input parameter
authorYannick Lamarre <ylamarre@efficios.com>
Tue, 26 Mar 2019 19:53:06 +0000 (15:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 29 Mar 2019 15:47:56 +0000 (11:47 -0400)
commitee34117ef97c7aa94500111f47adeb8ee84d4c9e
tree5d13d3fd5a733d16ea56b37ae0d266523c70b5c3
parente4e3a464febef797f59f6a7e4bac7088f894da65
Fix: Properly sanitize input parameter

The lttng client uses the sizeof the containing buffer, defined as
LTTNG_SYMBOL_NAME_LEN, for input string sanitation instead of libc defined
macro NAME_MAX. lttng-enable_channel improperly verified user input
and wrongly discarded valid input in case NAME_MAX was less than the
sizeof the containing buffer for the channel's name.
This patch also fixes potential buffer overflow caused by an improperly
bounded strcpy in the case where NAME_MAX would have been greater than
LTTNG_SYMBOL_NAME_LEN.

Signed-off-by: Yannick Lamarre <ylamarre@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_channels.c
This page took 0.025174 seconds and 4 git commands to generate.