[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150908133548.GB2174@bbox>
Date: Tue, 8 Sep 2015 22:35:49 +0900
From: Minchan Kim <minchan@...nel.org>
To: Luis Henriques <luis.henriques@...onical.com>
Cc: Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3] zram: fix possible use after free in zcomp_create()
On Tue, Sep 08, 2015 at 10:39:28AM +0100, Luis Henriques wrote:
> zcomp_create() verifies the success of zcomp_strm_{multi,siggle}_create()
> through comp->stream, which can potentially be pointing to memory that was
> freed if these functions returned an error.
>
> While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
> 'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create() could
> return other error codes. Function documentation updated accordingly.
>
> Fixes: beca3ec71fe5 ("zram: add multi stream functionality")
> Cc: stable@...r.kernel.org
> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
> Cc: Minchan Kim <minchan@...nel.org>
> Signed-off-by: Luis Henriques <luis.henriques@...onical.com>
Acked-by: Minchan Kim <minchan@...nel.org>
Thanks for the fix!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists