Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test and document the limitations of the fields in TracingPolicy #709

Open
3 tasks
Tracked by #1023
mtardy opened this issue Feb 21, 2023 · 7 comments
Open
3 tasks
Tracked by #1023

Test and document the limitations of the fields in TracingPolicy #709

mtardy opened this issue Feb 21, 2023 · 7 comments
Labels
area/documentation Improvements or additions to documentation area/testing Related to testing

Comments

@mtardy
Copy link
Member

mtardy commented Feb 21, 2023

The documentation on TracingPolicy limitation might be outdated. It would be interesting to update the documentation and add tests case to make sure the limitations are prevented from the agent side instead of failing silently or creating an error on the BPF side.

I see two ways of doing that:

  • experimentally, trying to break TracingPolicy and then someone can help to link to the BPF limitation.
  • reading the BPF code to retrieve the limits.

Limitations include for example:

  • max numbers of selectors
  • max PID values for matchPIDs
  • max number of matchArgs per selector
  • max values for matchBinaries
  • etc.

Tasks

Preview Give feedback
@mtardy mtardy added area/documentation Improvements or additions to documentation area/testing Related to testing labels Feb 21, 2023
@kevsecurity
Copy link
Contributor

kevsecurity commented Feb 23, 2023

filter_file_buf() in basic.h limits the number of file matches to MAX_MATCH_FILE_VALUES. This is 8 on kernels >=5.2 and 2 on kernels <5.2.

@kevsecurity
Copy link
Contributor

Postfix file match limited to 50 chars on kernels >=5.2 and 40 on kernels <5.2.

@kevsecurity
Copy link
Contributor

File match equal and prefix limited to 128 chars on kernels >=5.2 and 32 on kernels <5.2.

@mtardy mtardy changed the title Update documentation and test the limitations of the fields in TracingPolicy Test and document the limitations of the fields in TracingPolicy Jul 17, 2023
@kevsecurity
Copy link
Contributor

#1408 will alleviate some of these limitations. e.g. number of matches becomes unbounded; equal and prefix lengths become 128 on all kernels; and postfix length becomes 128 characters on kernels >=5.2 and 96 on kernels <5.2.

@jrfastab
Copy link
Contributor

This is old. File specific issues are refile with up to date info now.

@mtardy
Copy link
Member Author

mtardy commented Oct 20, 2023

well, it was the point of this issue because documentation is currently outdated.

@kkourt
Copy link
Contributor

kkourt commented Nov 27, 2023

well, it was the point of this issue because documentation is currently outdated.

Let's re-open it then?
Maybe let's start with points where our current docs are outdated

Faster: annotate the doc to mention it is outdated

Doing that would be a great first step!

@kkourt kkourt reopened this Nov 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/documentation Improvements or additions to documentation area/testing Related to testing
Projects
None yet
Development

No branches or pull requests

4 participants