commit | 4af5a2a49a7e9a35432b9657ef0803a1a0ee11ac | [log] [tgz] |
---|---|---|
author | Hoang Thuan Pham <hoang.pham@calian.ca> | Thu Jan 27 10:19:55 2022 -0500 |
committer | Matthew Khouzam <matthew.khouzam@ericsson.com> | Fri Feb 04 11:38:07 2022 -0500 |
tree | 393fb9489d1c7fbc81a7a395cf0909bc7810b5be | |
parent | c7272f2c32a65f15ede7dabcfc4dad91329d8e28 [diff] |
Add invalid trace files for ftrace security testing This commit adds 2 new binary ftrace files. In most cases, each section in the header of binary ftrace files contains a section header, and a section size. The size of the section allows the parser to read and process the section data. The 2 added ftrace files are injected with bad data, specifically bad section sizes for the header page section and the first cpu section. They are used for security tests and prevention of injection attacks. If the parser uses bad section sizes to read section data, it might go out of the file size limit and get into unauthorized memory locations. Add the missing blank javadoc lines in FtraceTestTrace, so the default Eclipse formatter does not do so while adding extra trailing space characters to these (wrongfully). Change-Id: Ia557b83416de83d0751cd33fef031bf4db09c0ef Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/tracecompass-test-traces/+/190075 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Marco Miller <marco.miller@ericsson.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
This tree contains a set of CTF test traces, primarily for use in Trace Compass.
To build the package and install it in your local Maven repo, simply isssue
mvn clean install
You can also use the deploy
target to populate both a standard Maven repo and a p2 update site. The -Dmaven-deploy-destination
and -Dp2-deploy-destination
properties can be used to specify their respective deploy locations. For example:
mvn clean deploy -Dmaven-deploy-destination=file:///var/www/traces/maven -Dp2-deploy-destination=/var/www/traces/repository
(Note that the first property needs a file:///
scheme, but the second does not.)
You can then point depending projects to these locations.
The modules follow the Maven standard directory layout.
To add a new CTF test trace, add it to the ctf/src/main/resources
directory. Make sure it is not archived or anything, as this will be exposed as-is to the users.
Then update the ctf/src/main/java/.../CtfTestTrace.java
file accordingly to include the new trace.
Make sure the parameters (event count, etc.) are correct! This project does not check those at the moment, but if they are incorrect they will fail some Trace Compass unit tests. This is a known issue.
Finally, bump the project's minor version (1.1.0 -> 1.2.0) in the main pom.xml and related <parent>
blocks.
The default mvn deploy
goal, when run from the Eclipse CI servers, will deploy to the following locations:
<dependency>
blocks)When pushing a new version, some extra work is required on the server to update the p2 update site. The /repository/
is directory a actually a p2 composite repository. But since the deploy simply overwrites the contents of /repository/latest/
, you need to do the following steps manually:
/latest/
directory to a new directory named after the new version, like /1.2.0/
(copy not move, please keep /latest/
available too).compositeArtifacts.xml
and compositeContent.xml
files to point to the new directory. Do not delete existing entries, other projects or git branches may still be using those.No extra steps are required for the Maven repo, since the Maven plugin handles multi-version deploying automatically.