From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935375AbdCWUj1 (ORCPT ); Thu, 23 Mar 2017 16:39:27 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34108 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933577AbdCWUjZ (ORCPT ); Thu, 23 Mar 2017 16:39:25 -0400 Date: Thu, 23 Mar 2017 13:39:21 -0700 From: Eric Biggers To: Dmitry Vyukov Cc: Herbert Xu , David Miller , linux-crypto@vger.kernel.org, LKML , syzkaller Subject: Re: crypto: out-of-bounds write in pre_crypt Message-ID: <20170323203921.GB92809@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Thu, Mar 23, 2017 at 11:51:30AM +0100, Dmitry Vyukov wrote: > Hello, > > I've got the following report while running syzkaller fuzzer. > init_crypt ignores kmalloc failure, which later leads to out-of-bounds > writes in ptr_crypt. On commit > 093b995e3b55a0ae0670226ddfcb05bfbf0099ae. > Thanks for finding this! Nice to see that the crypto code is getting tested... This bug was introduced in v4.10 and affects the generic XTS and LRW drivers. They are supposed to work in the event of a kmalloc failure, but evidently it's broken. I'm sending a patch shortly. - Eric