Re: [PATCH] compile-i386: fix use-after-free in func_cleanup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 4, 2012 at 12:42 PM, Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
> On Fri, Jun 1, 2012 at 9:55 PM, Christopher Li <sparse@xxxxxxxxxxx> wrote:
>> On Fri, Jun 1, 2012 at 9:22 AM, Xi Wang <xi.wang@xxxxxxxxx> wrote:
>>> compile-i386 sometimes crashes due a use-after-free error.  Since
>>> f->pseudo_list is freed first, which invalidates some atom->op* in
>>> f->atom_list.  Further checks like `atom->op1->flags & STOR_WANTS_FREE'
>>> will read garbage, which may lead to a double free.
>>>
>>> This patch switches the cleanup order and frees f->atom_list first.
>>> Those marked as STOR_WANTS_FREE won't appear in f->pseudo_list.
>>
>> Seems make sense. I will apply if Jeff don't have any objections.
>
> If the patch makes sense, go for it.  I'm on vacation in France until
> June 8, the original patch is not in my inbox, and I do not have
> readily available Internet connectivity besides... :)

Looks good to me.

Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux