Skip to content

Add kernelCTF CVE-2026-23392_cos#370

Open
NLQuy wants to merge 15 commits intogoogle:masterfrom
NLQuy:CVE-2026-23392_cos
Open

Add kernelCTF CVE-2026-23392_cos#370
NLQuy wants to merge 15 commits intogoogle:masterfrom
NLQuy:CVE-2026-23392_cos

Conversation

@NLQuy
Copy link
Copy Markdown
Contributor

@NLQuy NLQuy commented Apr 23, 2026

No description provided.

@NLQuy NLQuy closed this Apr 24, 2026
@NLQuy NLQuy reopened this Apr 24, 2026
setup_target(target);
kxdb.AddTarget(target);

target = kxdb.GetTarget("kernelctf", "cos-121-18867.381.45");
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 fix the usage of kernelXDK.

While you're adding missing structs and offsets in correct way, you should not lock the target to "cos-121-18867.381.45", you should run autodetect instead. The same way as in Step 8 here https://xdk.dev/libxdk/sample_exploit.html#hardcoded-sizes-and-offsets.

The current setup makes exploit unportable even after the missing structs and offsets are added to DB. With autodetect and missing structs added to DB (by kernelCTF team) we get portable exploit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, I've updated it.

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.

Hey @NLQuy. Please fix this minor thing with the way you setup the target and we'll be ready to give it "kCTF: vuln Ok" label. Cheers

@artmetla artmetla added the kCTF: vuln OK The submission exploits the claims vulnerability (passed manual verification) label May 9, 2026
target.AddSymbol("pop_rdx", 0x00170812); /* pop rdx ; ret */
target.AddSymbol("push_rdi_pivot", 0x004d4e1b); /* push rdi; pop rsp; jmp __x86_return_thunk */
target.AddSymbol("_copy_from_user", 0x009c01b0);
target.AddSymbol("msleep", 0x0027a4c0);
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 update ROP chain generation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, I've updated it.

rop.Add(g_target->GetSymbolOffset("msleep"), true);

auto rop_data = rop.GetData();
memcpy(p + rop_landing, rop_data.data(), rop_data.size());
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
Contributor Author

Choose a reason for hiding this comment

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

Got it, I've updated it.

@artmetla artmetla removed the kCTF: vuln OK The submission exploits the claims vulnerability (passed manual verification) label May 10, 2026
* Symbols: ROP gadgets + kernel variables
* These are offsets from kernel .text base (kbase).
*/
target.AddSymbol("pop_rdi", 0x00107e2d); /* pop rdi ; ret */
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
Contributor Author

Choose a reason for hiding this comment

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

Got it, I've updated it.

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.

Hey @NLQuy. There are a couple of more fixes needed. Sorry for not noticing them earlier.

@artmetla artmetla added the recheck Triggers kernelCTF PR verification again label May 10, 2026
@artmetla
Copy link
Copy Markdown
Collaborator

@NLQuy Thanks for fixes

@artmetla artmetla added the kCTF: vuln OK The submission exploits the claims vulnerability (passed manual verification) label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kCTF: vuln OK The submission exploits the claims vulnerability (passed manual verification) recheck Triggers kernelCTF PR verification again

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants