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>
Thu, 28 Mar 2019 19:52:47 +0000 (15:52 -0400)
commitd6a6a6091a565905b7b50b9b6d8ec5b0d02f605a
tree6bf90ba3992b1a0ab36d03d0e2324a98606d9b7b
parentf667fbd7f8b9512f9943edb2597c226fcc424ee9
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.026665 seconds and 5 git commands to generate.