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]
Message-ID: <3778379.0alfAEIvmc@tauon.atsec.com>
Date:	Fri, 12 Jun 2015 01:03:50 +0200
From:	Stephan Mueller <smueller@...onox.de>
To:	Tadeusz Struk <tadeusz.struk@...el.com>
Cc:	'Herbert Xu <herbert@...dor.apana.org.au>,
	'Quentin Gouchet' <quentin.gouchet@...il.com>,
	Daniel Borkmann <dborkman@...hat.com>,
	linux-api@...r.kernel.org, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 1/2] crypto: AF_ALG: add AEAD support

Am Thursday 11 June 2015, 15:59:29 schrieb Tadeusz Struk:

Hi Tadeusz,

>Hi Stephan,
>
>On 02/28/2015 11:50 AM, Stephan Mueller wrote:
>> +	err = af_alg_wait_for_completion(ctx->enc ?
>> +					 crypto_aead_encrypt(&ctx->aead_req) :
>> +					 crypto_aead_decrypt(&ctx->aead_req),
>> +					 &ctx->completion);
>> +
>> +	if (err) {
>> +		/* EBADMSG implies a valid cipher operation took place */
>> +		if (err == -EBADMSG)
>> +			aead_put_sgl(sk);
>> +		goto unlock;
>
>Shouldn't we free the TX sgl regardless of the error was?
>Or do we expect that the user will try to read again and it will be Ok the
>second time? Hope you still remember :)

It is the latter: as the crypto was not completed properly, leave the data in 
memory. This may allow a user to send more data if he needs to for completing 
the AEAD operation.

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