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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 30 May 2022 22:45:34 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Hillf Danton <hdanton@...a.com>,
        syzbot <syzbot+3ba551855046ba3b3806@...kaller.appspotmail.com>,
        linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] WARNING in dma_map_sgtable (2)

Someohow only the reply from Dan got delivered to me, not the mail
from Hillf he is replying to, so I'm abusing that to reply to the
previous mail..

On Mon, May 30, 2022 at 06:10:44PM +0300, Dan Carpenter wrote:
> > --- y/drivers/dma-buf/udmabuf.c
> > +++ u/drivers/dma-buf/udmabuf.c
> > @@ -273,6 +273,14 @@ static long udmabuf_create(struct miscde
> >  	if (IS_ERR(buf)) {
> >  		ret = PTR_ERR(buf);
> >  		goto err;
> > +	} else {
> > +		struct device *dev = ubuf->device->this_device;
> > +
> > +		if (!dev->dma_mask) {
> > +			ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
> > +			if (ret)
> > +				goto err;
> > +		}
> >  	}

This is compeltely broken.  If the underlying device is ot DMA capable and
we can't just set a random mask and still allow DMA mappings.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ