generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Describe the bug
Calling read_value on an uninitialized table_entry ends up with nil pointer dereference here or here.
Users are supposed to make sure get_entry is called before read_value, but there is no null check and nothing forbids it in the API.
e.g.
falcosecurity::table_entry thread_entry;
thread_entry = m_threads_table.get_entry(tr, thread_id);
m_container_id_field.read_value(tr, thread_entry, container_id);✅ the thread_entry has been initialized with get_entry
falcosecurity::table_entry thread_entry;
thread_entry = m_threads_table.get_entry(tr, thread_id);
m_container_id_field.read_value(tr, thread_entry, container_id);How to reproduce it
falcosecurity/plugins#1112 (comment)
Expected behaviour
The SDK protects from misusage that produces undefined behaviours.
Screenshots
Environment
<N/A>
Additional context
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working