lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150522075901.GU22558@mwanda>
Date:	Fri, 22 May 2015 10:59:01 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Dmitry Kalinkin <dmitry.kalinkin@...il.com>
Cc:	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
	Martyn Welch <martyn.welch@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Manohar Vanga <manohar.vanga@...il.com>,
	Igor Alekseev <igor.alekseev@...p.ru>
Subject: Re: [PATCH 6/6] staging: vme_user: provide DMA functionality

On Fri, May 22, 2015 at 01:12:19AM +0300, Dmitry Kalinkin wrote:
> On Tue, May 19, 2015 at 12:18 PM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
> > On Mon, May 18, 2015 at 09:56:33PM +0300, Dmitry Kalinkin wrote:
> >> 
> >> +     for_each_sg(sgt->sgl, sg, sg_count, i) {
> >> +             struct vme_dma_attr *pci_attr, *vme_attr, *dest, *src;
> >> +             dma_addr_t hw_address = sg_dma_address(sg);
> >> +             unsigned int hw_len = sg_dma_len(sg);
> >> +
> >> +             vme_attr = vme_dma_vme_attribute(dma_op->vme_addr + pos,
> >                                                 ^^^^^^^^^^^^^^^^^^^^^^
> > 
> > ->vme_addr comes from the user and we don't seem to have done any
> > validation that it's correct.  This addition can overflow.  How is this
> > safe?  (This is not a rhetorical question, I am a newbie in this).
> > 
> This expression calculates address on the VME bus, where we already have
> full access. There shouldn't have security implications. Such transfer will
> most likely wrap or cause DMA transfer error (gives EIO).

Ahh...   Thanks. Again I was just asking because I'm a bit of a newbie
here so there wasn't really a need to add the other check just to make
me happy.  But I do like the new check as well.

regards,
dan carpenter

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ