Skip to content

Add kernelCTF CVE-2025-37890_lts_cos_mitigation#302

Open
phlaie wants to merge 4 commits intogoogle:masterfrom
star-sg:CVE-2025-37890_lts_cos_mitigation
Open

Add kernelCTF CVE-2025-37890_lts_cos_mitigation#302
phlaie wants to merge 4 commits intogoogle:masterfrom
star-sg:CVE-2025-37890_lts_cos_mitigation

Conversation

@phlaie
Copy link
Contributor

@phlaie phlaie commented Dec 12, 2025

No description provided.

@phlaie
Copy link
Contributor Author

phlaie commented Jan 8, 2026

Working on addressing LTS stability issues (same as PR 301).

@koczkatamas koczkatamas added the kCTF: vuln OK The submission exploits the claims vulnerability (passed manual verification) label Jan 16, 2026
@koczkatamas koczkatamas changed the title Add CVE-2025-37890_lts_cos_mitigation Add kernelCTF CVE-2025-37890_lts_cos_mitigation Jan 16, 2026
@matrizzo matrizzo self-assigned this Feb 27, 2026
Copy link
Collaborator

@matrizzo matrizzo left a comment

Choose a reason for hiding this comment

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

Hi, thank you for your submission. There are a few style issues, please take a look at our style guide and try to fix them. In particular try to get rid of all the unused code and assign names to all hardcoded constants/explain why they have that value.

Comment on lines +104 to +109
void mypause()
{
printf("[~] pausing... (press enter to continue)\n");
char scratch[11];
read(0, scratch, 10); // wait for input
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove unused code parts from the source code. The function mypause is defined but never called.

https://google.github.io/security-research/kernelctf/style_guide#unused-code

size_t candidate = 0;
size_t hashmap[1024]; // ~ 0xffffffff80000000-0xffffffffc0000000
memset(&hashmap, 0, sizeof(hashmap));
sleep(10);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment to every sleep() explaining what you are waiting for.

https://google.github.io/security-research/kernelctf/style_guide#sleeping-waiting


for (size_t i = 0; i < REPEAT; i++) {
set_cpu(i % 2);
sleep(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment to every sleep() explaining what you are waiting for.

https://google.github.io/security-research/kernelctf/style_guide#sleeping-waiting

Comment on lines +693 to +696
int send_req_noblock(int priority)
{
return _send_req(priority, 1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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


/*keyring section*/
#define KEY_DESC_SIZE (0x200 - 0x18 + 1)
char key_desc[KEY_DESC_SIZE];
Copy link
Collaborator

Choose a reason for hiding this comment

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

int setup_vuln_tree(const int netlink_fd, const char *multiq_band_name)
{
// create netem with poison settings
SYSOK(create_qdisc_netem(netlink_fd, get_id("3:0"), get_id(multiq_band_name))); // :1 is bands[0], :2 is bands[1]
Copy link
Collaborator

Choose a reason for hiding this comment

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

// 1. setup plugs
for (int i = 0; i < num_tx; i++)
{
int band = 0x20000 + i + 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment on lines +454 to +458
struct netlink_send_cb_struct
{
void (*cb)(char *, size_t, void *);
void *cb_out;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

This structure appears to be unused, it's only pased to __netlink_send and the only time that function is called that argument is NULL.

key_desc[CF_NODE_OFFSET - KEY_DESC_HEADER_SIZE] = 1;

/* hfsc_class.cl_e > cur_time (fail eltree_get_mindl)*/
*(size_t *)&key_desc[CL_E_OFFSET - KEY_DESC_HEADER_SIZE] = 0xffffffffffffffff;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use UINT64_MAX instead of 0xffffffffffffffff

close(memfd);

while (check_core() == 0)
usleep(100); // 0.1ms
Copy link
Collaborator

Choose a reason for hiding this comment

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

This sleep should have a comment that explains why it's here.

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants