Fix: add element length check in lttng_index_file_open
A message that is not in the archive (sent off-list or not yet received): [email protected]
Merged in master, stable-2.9 and stable-2.8.
Thanks!
Jérémie
Quoted 26 lines · Mathieu Desnoyers
Handle cases where the index file header would contain a corrupted value.
Signed-off-by Mathieu Desnoyers <[email protected]>--- src/common/index/index.c | 4 ++++ 1 file changed, 4 insertions(+)src/common/index/index.c +4
-1@@ -246,6 +246,10 @@ struct lttng_index_file *lttng_index_file_open(const char *path_name,ERR ("Invalid header version" ); goto error_close; } +if (element_len >sizeof (struct ctf_packet_index )) { +ERR ("Index element length too long" ); + goto error_close; + } index_file->fd = read_fd; index_file->major = major; --2.1.4
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev