Tell me more ×
IT Security Stack Exchange is a question and answer site for IT security professionals. It's 100% free, no registration required.

I don't understand about this bug very much
This is something that I know about this bug

  • If use free() with freed pointer it can trigged this bug

  • Need to have at least 2 pointer with allocate memory

Question
how to write exploit code to attack this bug (Proof-of-Concept)


Here is my code

int main(int argc,char **argv){
char *ptr1 = malloc(200);
char *ptr2 = malloc(200);
free(ptr1);
strncpy(ptr2,argv[1],100);
free(ptr1);
free(ptr2);

share|improve this question
Welcome to the site. Please have a look at the FAQ to understand which questions are a good fit here. This one is too localised. I would suggest the core requirement it's am in depth knowledge of the language and then extensive study – Rory Alsop Nov 17 '12 at 13:20

closed as too localized by Terry Chia, Rory Alsop Nov 17 '12 at 13:17

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.