On Thu, Mar 11, 2021 at 10:40:33PM +0800, lyl2...@mail.ustc.edu.cn wrote:
> So, register_test_dev_kmod() will return a valid and freed test_dev, and
> cause use after free
> in function test_kmod_init().
Without looking at the details, in trying to improve the commit log
further:
Is there a way
> -原始邮件-
> 发件人: "Luis Chamberlain"
> 发送时间: 2021-03-11 21:58:33 (星期四)
> 收件人: lyl2...@mail.ustc.edu.cn
> 抄送: linux-kernel@vger.kernel.org
> 主题: Re: Re: [PATCH] lib/test_kmod: Fix a use after free in
> register_test_dev_kmod
>
> On Thu, M
On Thu, Mar 11, 2021 at 09:31:55PM +0800, lyl2...@mail.ustc.edu.cn wrote:
>
>
>
> > -原始邮件-
> > 发件人: "Luis Chamberlain"
> > 发送时间: 2021-03-11 21:01:08 (星期四)
> > 收件人: "Lv Yunlong"
> > 抄送: linux-kernel@vger.kernel.org
> -原始邮件-
> 发件人: "Luis Chamberlain"
> 发送时间: 2021-03-11 21:01:08 (星期四)
> 收件人: "Lv Yunlong"
> 抄送: linux-kernel@vger.kernel.org
> 主题: Re: [PATCH] lib/test_kmod: Fix a use after free in register_test_dev_kmod
>
> On Thu, Mar 11, 2021 a
On Thu, Mar 11, 2021 at 12:02:46AM -0800, Lv Yunlong wrote:
> In register_test_dev_kmod, it calls free_test_dev_kmod() to free
> test_dev. But free_test_dev_kmod() can't set the original pointer
> test_dev to NULL, because the test_dev was passed by it's value
> not reference.
Did you actually get
In register_test_dev_kmod, it calls free_test_dev_kmod() to free
test_dev. But free_test_dev_kmod() can't set the original pointer
test_dev to NULL, because the test_dev was passed by it's value
not reference.
Signed-off-by: Lv Yunlong
---
lib/test_kmod.c | 2 +-
1 file changed, 1 insertion(+),
6 matches
Mail list logo