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
| ||
|
Message-ID: <20190415063832.2qmhtek644nd2ywt@gondor.apana.org.au> Date: Mon, 15 Apr 2019 14:38:33 +0800 From: Herbert Xu <herbert@...dor.apana.org.au> To: Eric Biggers <ebiggers@...nel.org> Cc: syzbot <syzbot+6f72c20560060c98b566@...kaller.appspotmail.com>, davem@...emloft.net, linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, syzkaller-bugs@...glegroups.com, Ondrej Mosnacek <omosnace@...hat.com> Subject: Re: crypto: xts - Fix atomic sleep when walking skcipher On Sun, Apr 14, 2019 at 09:35:13AM -0700, Eric Biggers wrote: > > This isn't correct because skcipher_walk_virt() can still sleep when > atomic=true, since it may need to copy the IV. That's why I added might_sleep() > to it in commit bb648291fc04, and that's what's triggering here. Thanks for catching this Eric! > This is the correct fix: > > diff --git a/crypto/xts.c b/crypto/xts.c > index aed11e63ca315..359ef15e1673e 100644 > --- a/crypto/xts.c > +++ b/crypto/xts.c > @@ -101,6 +101,7 @@ static int xor_tweak(struct skcipher_request *req, bool second_pass) > req = &rctx->subreq; > /* set to our TFM to enforce correct alignment: */ > skcipher_request_set_tfm(req, tfm); > + req->base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; > } This is what I'm doing in v2, except I've moved it over to crypt_done so that we don't affect the synchronous path. Cheers, -- Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists