Open rafaeldtinoco opened 1 year ago
Is this awaiting any related changes or can I tackle the Event
int
change to uint32
?
Is this awaiting any related changes or can I tackle the
Event
int
change touint32
?
Please do tackle this. Make sure to test it extensively (including internal E2E) because Im a bit afraid of this change. Let me know if you need anything. Thanks a lot!
After offline discussion we decided to wait the Event
be replaced by https://github.com/aquasecurity/tracee/blob/main/api/v1beta1/event.proto#L11 which already tackled the type normalisation. @josedonizetti please refer (close) this in your upcoming work. Thanks.
@geyslan @rafaeldtinoco yeah, I think waiting is for the best now since it seems we will migrate the event structure for the 0.20.0 release, but if we see it is not the case in the next few weeks, this can should indeed be fixed.
@rscampos let's discuss this later?
Description
While aware of https://github.com/aquasecurity/tracee/issues/2870, we still need to support/fix current tracee event context, as it has data types overflows that are likely causing context to be lost (all uint32 values, from the eBPF context, might be overflowed when decoded into
Event struct
, such as the PIDNS value, declared asint
, which defaults to very high numbers in my env).More details
While playing with some marshalling and unmarshalling ideas (for other output printers, for example), I got the following error after a event -> json -> parquet conversion:
and:
and
isn't quite an unsigned 32 bit overflow but it is a signed 32 bit overflow.
Meaning that a bunch of Event fields that are
int
should actually beuint32
:The event struct dates from 2020 and since the beginning has uin32 types declared as ints. We probably never payed hard attention because most of the values don't overflow often (and if they do we wouldn't catch in any test I believe). But the default PID namespaces are overflowing in my environments. It happened by accident because Parquet does not support unsigned integers on its data format.