Skip to content

Add kernelCTF CVE-2026-23271_lts#379

Open
simond67 wants to merge 13 commits into
google:masterfrom
simond67:Add-kernelCTF-CVE-2026-23271_lts
Open

Add kernelCTF CVE-2026-23271_lts#379
simond67 wants to merge 13 commits into
google:masterfrom
simond67:Add-kernelCTF-CVE-2026-23271_lts

Conversation

@simond67
Copy link
Copy Markdown

@simond67 simond67 commented May 6, 2026

No description provided.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 6, 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.

@simond67 simond67 force-pushed the Add-kernelCTF-CVE-2026-23271_lts branch from 34004d3 to d383bff Compare May 7, 2026 03:04
rop.Add(g_target->GetSymbolOffset("_copy_from_user"), true);
rop.Add(g_target->GetSymbolOffset("pop_rdi_ret"), true);
rop.Add(0x10000ULL);
rop.Add(g_target->GetSymbolOffset("msleep"), true);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check RopActionId::MSLEEP and utilise it here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @artmetla, thanks for the review. I've fixed this in 2cfca2c.

memset(fake_event, 0, PERF_EVENT_SIZE);

// Safety fields
*(uint64_t*)(fake_event + off_ctx) = 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at PayloadBuilder and Payload. An example could be https://github.com/google/kernel-research/blob/main/libxdk/samples/exp151/exploit.cpp

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this in 2cfca2c.

Copy link
Copy Markdown
Collaborator

@artmetla artmetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @simond67. Please check the comments provided on XDK usage


// ROP chain at event + 0x8 (right after destroy field)
RopChain rop(*g_target, ktext);
rop.Add(g_target->GetSymbolOffset("pop_rdi_ret"), true);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a symbol. This is gadget. So you should follow https://google.github.io/security-research/kernelctf/style_guide.html#rop-chains as it's impossible to utilise XDK's RopChain

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this in 2cfca2c.

@simond67 simond67 force-pushed the Add-kernelCTF-CVE-2026-23271_lts branch from b6c6c07 to fac130e Compare May 11, 2026 06:31
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.

2 participants