You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This warrants a wider discussion. Maybe start from these concrete examples and see if there is something systematic and then file for fine-grained items to address. Do you @cujomalainey a stack trace from fuzz to some example case for e.g. comp_dev_get_first_data()? There is a clear assumption at least one buffer is always connected, but if this check can be avoided, this is indeed a problem.
As comp_dev_get_first_data_() is quite recent addition, I'll loop in @marcinszkudlinski to comment on this. Did you consider how to handle NULL returns (it does look you just kept the semantics of the old list_first_item().
I don't have any examples of comp_get_data_blob yet but its not hard to see the relationship between the binary coming from the IPC (I.e. user space). The issue is not that there is a buffer, its that the buffer is the size we expect. If user space passed in a single byte and we were expecting 20, that is an issue if we don't check the size.
Regarding the buffer checks, here is an example where the fuzzer called trigger on an disconnected selector
Describe the bug
Lack of size checks on blobs or topology state.
E.g.
comp_dev_get_first_data_*
missing nullity checkscomp_get_data_blob
not checking the size paramsTo Reproduce
fuzz
Reproduction Rate
high
Expected behavior
robust code
Impact
security
Possible long term fix
Algebraic typing (RUST!)
Short term fixes
Some sort of checks on special functions we know are misused using CI tooling
The text was updated successfully, but these errors were encountered: