Re: [PATCH net V2] tuntap: correctly handle error in tun_set_iff()

From: David Miller
Date: Thu Sep 12 2013 - 17:22:52 EST


From: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
Date: Wed, 11 Sep 2013 13:43:50 +0300

> On Wed, Sep 11, 2013 at 06:09:48PM +0800, Jason Wang wrote:
>> Commit c8d68e6be1c3b242f1c598595830890b65cea64a
>> (tuntap: multiqueue support) only call free_netdev() on error in
>> tun_set_iff(). This causes several issues:
>>
>> - memory of tun security were leaked
>> - use after free since the flow gc timer was not deleted and the tfile
>> were not detached
>>
>> This patch solves the above issues.
>>
>> Reported-by: Wannes Rombouts <wannes.rombouts@xxxxxxxxxx>
>> Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
>> Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
>
> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/