From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [patch] arcmsr: buffer overflow in arcmsr_iop_message_xfer() Date: Thu, 15 Sep 2016 16:43:56 +0300 Message-ID: <20160915134356.GG26713@mwanda> References: <20160915120142.GA2349@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:45310 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753383AbcIONob (ORCPT ); Thu, 15 Sep 2016 09:44:31 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Tomas Henzl Cc: "James E.J. Bottomley" , Marco Grassi , "Martin K. Petersen" , Ching Huang , Johannes Thumshirn , Hannes Reinicke , linux-scsi@vger.kernel.org, security@kernel.org On Thu, Sep 15, 2016 at 03:19:12PM +0200, Tomas Henzl wrote: > > @@ -2397,6 +2398,10 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb, > > } > > ptmpuserbuffer = ver_addr; > > user_len = pcmdmessagefld->cmdmessage.Length; > > + if (user_len > ARCMSR_API_DATA_BUFLEN) { > > + retvalue = ARCMSR_MESSAGE_FAIL; > > Hi, > I think that a 'kfree(ver_addr);' should be added here. > With that you may add my reviewed-by. Oops... Thanks for catching that. I should have been more careful. v2 on the way. regards, dan carpenter