-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'google:master' into CVE-2023-3776
- Loading branch information
Showing
208 changed files
with
30,970 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: kernelCTF auto releaser | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 12 * * *' # every day at 12:00 UTC | ||
permissions: {} | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: kernelctf | ||
jobs: | ||
get_new_builds: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install prerequisites | ||
run: sudo apt install -yq --no-install-recommends python3-lxml | ||
|
||
- id: check | ||
name: Check latest kernel versions | ||
run: ./get_latest_kernel_versions.py | ||
outputs: | ||
releases: ${{ steps.check.outputs.releases }} | ||
|
||
build_release: | ||
needs: get_new_builds | ||
if: fromJSON(needs.get_new_builds.outputs.releases)[0] != null | ||
strategy: | ||
matrix: | ||
release: ${{ fromJSON(needs.get_new_builds.outputs.releases) }} | ||
fail-fast: false # do not cancel other builds | ||
uses: ./.github/workflows/kernelctf-release-build.yaml | ||
secrets: inherit | ||
with: | ||
releaseId: ${{ matrix.release.releaseId }} | ||
branch: ${{ matrix.release.branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: kernelCTF release build | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseId: | ||
description: 'Release ID' | ||
type: string | ||
required: true | ||
branch: | ||
description: 'Branch, tag or commit' | ||
type: string | ||
required: false | ||
workflow_call: | ||
inputs: | ||
releaseId: | ||
type: string | ||
branch: | ||
type: string | ||
run-name: 'kernelCTF release: ${{inputs.releaseId}}' | ||
permissions: {} | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: kernelctf | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check release does not exist yet | ||
run: curl --fail -I https://storage.googleapis.com/kernelctf-build/releases/${{inputs.releaseId}}/bzImage && exit 1 || true | ||
|
||
- name: Install prerequisites | ||
run: sudo apt install -yq --no-install-recommends build-essential flex bison bc ca-certificates libelf-dev libssl-dev cpio pahole | ||
|
||
- name: Build | ||
run: ./build_release.sh ${{inputs.releaseId}} ${{inputs.branch}} | ||
|
||
- name: Show releases | ||
run: find releases -type f|xargs ls -al | ||
|
||
- name: Upload release artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{inputs.releaseId}} | ||
path: kernelctf/releases/${{inputs.releaseId}} | ||
if-no-files-found: error | ||
|
||
upload: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Download exploit | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{inputs.releaseId}} | ||
path: ./kernelctf/releases/${{inputs.releaseId}} | ||
|
||
- name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: '${{secrets.KERNELCTF_GCS_SA_KEY}}' | ||
|
||
- name: Upload release | ||
uses: 'google-github-actions/upload-cloud-storage@v1' | ||
with: | ||
path: kernelctf/releases/${{inputs.releaseId}} | ||
destination: kernelctf-build/releases | ||
predefinedAcl: publicRead | ||
gzip: false # most of the files are compressed already, do not compress them again | ||
process_gcloudignore: false # removes warnings that .gcloudignore file does not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pocs/cpus/reptar/minimized/reptar.*.bin | ||
pocs/cpus/reptar/minimized/reptar.*.elf | ||
pocs/cpus/reptar/minimized/reptar.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.cache/ | ||
__pycache__/ | ||
builds/ | ||
releases/ |
Oops, something went wrong.