双免费 [英] double free

查看:67
本文介绍了双免费的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了一篇关于c ++编程和内存分配的文档,并且

我遇到了一个我从未听过的新术语,双倍免费。

我尝试过谷歌搜索它,但我没有找到任何解释,可以有人

告诉我它是什么?这是一个可被恶意代码利用的漏洞吗?

解决方案

edware写道:

我读了一篇关于c ++编程和内存分配的文档,并且我发现了一个我以前从未听过的新术语,双重免费。
我试着谷歌搜索它,但我没有找到任何解释,有人可以告诉我它是什么?这是一个可被恶意代码利用的漏洞吗?




我认为这里提到的情况如下:


void * p = malloc(100); //给我100个字节,只是为了好玩...

free(p); //扔掉它们,一切都很好

free(p); //再次???? NO-OOOOOOOOO(未定义的行为)


V

-

请在回复时删除资金''A'电子邮件

我没有回复最热门的回复,请不要问


edware写道:
< blockquote class =post_quotes>我读了一篇关于c ++编程和内存分配的文档,并且我发现了一个我以前从未听过的新术语,双重免费。
我试着谷歌搜索但是我没有发现任何解释,有人可以告诉我它是什么吗?这是一个可被恶意代码利用的漏洞吗?




你能引用文档中的上下文吗?


唯一可能的猜测是它意味着在相同的

指针上调用free()两次,这是一个禁忌。


-

Phlip
http://c2.com/ cgi / wiki?ZeekLand < - 不是博客!!!


Phlip写道:

edware写道:

我读了一篇关于c ++编程和内存分配的文档,并且我发现了一个我从未听过的新术语,双重免费。
我试过谷歌搜索对于它,但我没有找到解释,有人可以告诉我它是什么?这是一个可以被恶意代码利用的漏洞吗?



你能引用文档中的上下文吗?

唯一可能的猜测是它意味着在相同的
指针上调用free()两次,这是一个禁忌。


http://cprogramming.com/tutorial/secure.html

双重免费攻击。


也许应该发布到comp.lang.c而不是因为

它的malloc和free,但我没想到

因为我正在阅读C ++教程。


I read a document about c++ programming and memory allocation, and
I came across a new term I''ve never heard before, double free.
I tried googling for it but I found no explanation, can someone
tell me what it is? Is it a vulnerability that can be exploited by
malicious code?

解决方案

edware wrote:

I read a document about c++ programming and memory allocation, and
I came across a new term I''ve never heard before, double free.
I tried googling for it but I found no explanation, can someone
tell me what it is? Is it a vulnerability that can be exploited by
malicious code?



I think what is referred here is the situation like the following:

void *p = malloc(100); // get me 100 bytes, just for fun...
free(p); // throw them out, everything''s fine
free(p); // AGAIN???? NO-O-O-O-O-O-O-O-O-O (undefined behaviour)

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


edware wrote:

I read a document about c++ programming and memory allocation, and
I came across a new term I''ve never heard before, double free.
I tried googling for it but I found no explanation, can someone
tell me what it is? Is it a vulnerability that can be exploited by
malicious code?



Can you quote the context in the document?

The only guess possible is it means calling free() twice on the same
pointer, which is a no-no.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


Phlip wrote:

edware wrote:

I read a document about c++ programming and memory allocation, and
I came across a new term I''ve never heard before, double free.
I tried googling for it but I found no explanation, can someone
tell me what it is? Is it a vulnerability that can be exploited by
malicious code?



Can you quote the context in the document?

The only guess possible is it means calling free() twice on the same
pointer, which is a no-no.


http://cprogramming.com/tutorial/secure.html
Its under Double Free Attack.

Maybe should have posted to comp.lang.c instead since
its malloc and free, but I didn''t think of that
since I was reading the C++ tutorial.


这篇关于双免费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆