Skip to content

kernelCTF exp521: CVE-2025-40019 essiv on mitigation-v4-6.12#382

Open
AshmitSh4rma wants to merge 3 commits into
google:masterfrom
AshmitSh4rma:kernelctf-exp521-CVE-2025-40019-mit4
Open

kernelCTF exp521: CVE-2025-40019 essiv on mitigation-v4-6.12#382
AshmitSh4rma wants to merge 3 commits into
google:masterfrom
AshmitSh4rma:kernelctf-exp521-CVE-2025-40019-mit4

Conversation

@AshmitSh4rma
Copy link
Copy Markdown

Submission for exp521.

Layout

  • docs/vulnerability.md — bug root cause + introducing/fixing commits
  • docs/exploit.md — full 8-step exploit walkthrough (essiv ssize underflow → chained-SGL crafted reclaim → PTE remap → core_pattern overwrite → root via usermodehelper + pidfd stdio theft)
  • exploit/mitigation-v4-6.12/exploit.c — single-file source (~620 lines)
  • exploit/mitigation-v4-6.12/tinycrypto.h — inline AES-256-ECB + SHA-256 (drops OpenSSL runtime dependency)
  • exploit/mitigation-v4-6.12/Makefilemake exploit builds; make run notes
  • exploit/mitigation-v4-6.12/exploit — the binary that captured the flag
  • original.tar.gz — matches the SHA256 submitted via the Google Form
  • metadata.json — schema v3

Reachability

Triggerable from any unprivileged UID with no caps and no user namespaces. Required configs: CONFIG_CRYPTO_USER_API_AEAD=y, CONFIG_CRYPTO_ESSIV=y (both =y in the kCTF mitigation-v4 image). Compatible with all of the kCTF mitigation hardening (max_user_namespaces=1, io_uring_disabled=2, unprivileged_bpf_disabled=2).

Adds a 1-day submission porting the published CVE-2025-40019 essiv
ssize-underflow technique to the mitigation-v4-6.12 target (vanilla
v6.12.0 + jannh mitigations).

- Flag captured live 2026-05-13 13:33Z (exp521 on the public spreadsheet).
- Per-target symbol offsets re-derived from the mit-v4-6.12 vmlinux.
- Inline AES-256-ECB + SHA-256 (tinycrypto.h) to drop the OpenSSL
  runtime dependency.
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

- affected_versions: use '6.0 - 6.12.82' (range form per schema regex)
- requirements.attack_surface: empty (only 'userns'|'io_uring' enum allowed,
  this exploit uses neither)
- exploits.mitigation-v4-6.12.uses: empty for same reason

Free-text bug-class / primitive descriptions live in docs/exploit.md, not
in metadata.json's tag arrays.
@AshmitSh4rma
Copy link
Copy Markdown
Author

The structure_check is currently failing on:

The CVE on the public spreadsheet for submission exp521 is `` but the PR is for CVE-2025-40019.

The CVE column on the public spreadsheet for exp521 is currently blank, but the same patch commit (6bb73db6948c2de23e407fe1b7ef94bf02b7529f) has been auto-resolved to CVE-2025-40019 on five prior submissions for this same target (exp478, exp501, exp502, exp504, exp505). It looks like the auto-resolver hasn't fired for the exp521 row yet — last_modification matches the original submission time, and the patch_title column is also empty.

There is no user-facing CVE field on the Google submission form, so I can't populate it from my side. Could a reviewer kick the auto-resolver, or fill the patch_title / CVE columns manually so the PR check can proceed?

The PR metadata correctly identifies the bug as CVE-2025-40019 via metadata.json. Schema-validation errors from the first run have been fixed in commit cb836aa.

@AshmitSh4rma AshmitSh4rma force-pushed the kernelctf-exp521-CVE-2025-40019-mit4 branch from cb836aa to d992fae Compare May 13, 2026 15:36
@AshmitSh4rma
Copy link
Copy Markdown
Author

@googlebot I have signed the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant