本次强网拟态2023,我们Polaris战队排名第12。01PWN1.water-ker有一次UAF的机会 case 0x30u: if ( !copy_from_user(&a4, v4, 8LL) ) { if ( delete_idx 0 && chunk ) { kfree(chunk); ++delete_idx; } return 0LL; } return -22LL;UAF后可以有一次修改1个字节的机会 case 0x50u: if ( !copy_from_user(&a4, v4, 8LL) ) { if ( edit_idx 0 && chunk && !copy_from_user(chunk, a4.buf, 1LL) ) { ++edit_idx; return 0LL; } return 0LL; } return -22LL;内核版本 6.4.0free_list指针在slab块中间位置(0x100的位置)并且free_list开启了指针异或没有开启Harden_free_listslab的kmalloc和kfree可以预测。参考自 https://arttnba3.cn/2023/05/02/CTF-0X08_D3CTF2023_D3KCACHE/#define _GNU_SOURCE#include #include #include #include #include #include #define F
………………………………