lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221219092139.222456-1-zyytlz.wz@163.com>
Date:   Mon, 19 Dec 2022 17:21:39 +0800
From:   Zheng Wang <zyytlz.wz@....com>
To:     zhi.a.wang@...el.com
Cc:     1002992920@...com, airlied@...il.com, airlied@...ux.ie,
        alex000young@...il.com, dri-devel@...ts.freedesktop.org,
        gregkh@...uxfoundation.org, hackerzheng666@...il.com,
        intel-gfx@...ts.freedesktop.org,
        intel-gvt-dev@...ts.freedesktop.org,
        joonas.lahtinen@...ux.intel.com, linux-kernel@...r.kernel.org,
        security@...nel.org, tvrtko.ursulin@...ux.intel.com,
        zhenyuw@...ux.intel.com, zyytlz.wz@....com
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry

Wang, Zhi A <zhi.a.wang@...el.com> 于2022年12月19日周一 16:22写道:

>
> I think it is a case-by-case thing. For example:
>
> The current scenario in this function looks like below:
>
> caller pass spt a
> function
>         alloc spt b
>         something error
>         free spt a
>         return error
>
> The problem is: the function wrongly frees the spt a instead free what
> it allocates.

Thanks for your clear explaination. It’s really helpfult to me.
I think I might know how to fix now.

> A proper fix should be:
>
> caller pass spt a
> function
>         alloc spt b
>         something error
>         *free spt b*
>         return error
>
As it's a case-by-case thing, I'll extract the un-done-mapping-dma part from
ppgtt_invalidate_spt and put it in error path. Then I'll add the code of freeing
new allocated spt. If I misunderstand your meaning, feel free to let me know.
Working on a new fix now.

Best regards,
Zheng Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ