From: "Stephan Müller" <smueller@chronox.de>
To: Harsh Jain <harshjain.prof@gmail.com>
Cc: linux-crypto@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: BUG: Seems un-initialed dst pointer received from algif_aead when outlen is zero
Date: Tue, 21 Mar 2017 12:43:02 +0100 [thread overview]
Message-ID: <3894659.2TbsNqkGul@tauon.atsec.com> (raw)
In-Reply-To: <CAFXBA=m10UrBr1qqJ3j9F-hUXL6Bm+iEi6jLLEv9tVmCXc_p1A@mail.gmail.com>
Am Dienstag, 21. März 2017, 11:59:54 CET schrieb Harsh Jain:
Hi Harsh,
> > Executing this command on a 4.9 kernel, I get:
> >
> > bin/kcapi -x 2 -c "gcm(aes)" -i 0d92aa861746b324f20ee6b7 -k
> > f4a6a5e5f2066f6dd9ec6fc5169c29043560ef595c9e81e76f42d29212cc581c -a "" -t
> > "5f24c68cbe6f32c29652442bf5d483ad" -q ""
> > EBADMSG
>
> Probably because s/w implementation is not trying to access dst sg
> pointer because there's nothing to copy in destination buffer. 1
> question If we don't have data to copy to destination buffer what
> should dst pointer contains?
The dst SGL should simply be discarded by implementations in the case you
mention above.
The implementation receives the tag size and the supplied input buffer. If
that input buffer length is equal to the tag length (i.e. no AAD and no
ciphertext), why would the dst SGL be ever touched during decrytion?
Ciao
Stephan
next prev parent reply other threads:[~2017-03-21 11:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 6:13 BUG: Seems un-initialed dst pointer received from algif_aead when outlen is zero Harsh Jain
2017-03-21 10:04 ` Stephan Müller
2017-03-21 10:59 ` Harsh Jain
2017-03-21 11:17 ` Harsh Jain
2017-03-21 11:43 ` Stephan Müller [this message]
2017-03-21 13:23 ` Harsh Jain
2017-03-21 15:00 ` Stephan Müller
2017-03-22 2:57 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3894659.2TbsNqkGul@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=harshjain.prof@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox