半肾
精华
|
战斗力 鹅
|
帖子
注册时间 2013-6-18
|
overwrite memory with controlled data
For that, I’ve used sceNetControl(int a1, int a2, void *ubuf, int argsize). When passed proper flags, it will allocate a buffer = malloc(argsize) and then copy in user data. At the end of the function, the buffer is freed but it doesn’t really matter because free() doesn’t destroy our data.
With an argsize that matches the socket object size and proper kernel heap spraying, the allocated buffer will have the same address as the freed socket.
倘若FREE后有清零,这步就不成立了 |
|