Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: Harsh Jain <harshjain.prof@gmail.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: kernel tainted while exporting shash context using af_alg interface
Date: Sun, 25 Oct 2015 12:58:38 +0100	[thread overview]
Message-ID: <2725312.7LhRVP0piv@tauon.atsec.com> (raw)
In-Reply-To: <CAFXBA=mVmRsAk3fuyjf3WA-P+0dHKu0upUdb5Qxr0kwn1rKiDw@mail.gmail.com>

Am Sonntag, 25. Oktober 2015, 11:56:27 schrieb Harsh Jain:

Hi Harsh,

>Hi,
>
>
>When trying to calculate HMAC(SHA1) with openssl using af-alg engine
>kernel crashes.Find below the command used and kernel. I have added
>some debug print in logs.
>
>Command used : ./openssl dgst -engine af_alg -sha1 -hmac "key" r.txt
>kernel version : 3.17.8
>
>Initial Investigation : In shash_desc structure tfm pointer contains
>5a5a5a5a5a5a5a5a(invalid pointer), when it triess to reference export
>function pointer it crashes. As per my understanding tfm object should
>have pointer of memory bloack allocated in
>"crypto_init_shash_ops_async" function
>
>Please give some pointers to debug the issue.Any documentation to
>understand the crypto-api code.

May I ask you to send 2 things: the source code of the OpenSSL af_alg engine 
that you use (IIRC it is not included upstream, I want to be sure I used the 
right one).

Further, can you attach an strace of the aforementioned command?

Note, I am playing and abusing the AF_ALG interface for quite some time with 
[1] but I did not come across any issues like the one you describe here.

[1] http://www.chronox.de/libkcapi.html

Ciao
Stephan

  reply	other threads:[~2015-10-25 11:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25  6:26 kernel tainted while exporting shash context using af_alg interface Harsh Jain
2015-10-25 11:58 ` Stephan Mueller [this message]
2015-10-26  6:19   ` Harsh Jain
2015-10-26  9:21     ` Harsh Jain
2015-10-28  0:09       ` Stephan Mueller
2015-10-28  0:55         ` Stephan Mueller
2015-10-28 10:54           ` Harsh Jain
2015-10-28 11:23             ` Stephan Mueller
2015-10-30  8:32               ` Harsh Jain
2015-10-30 11:10                 ` Stephan Mueller
2015-10-30 12:16                   ` crypto: algif_hash - Only export and import on sockets with data Herbert Xu
2015-10-30 23:45                     ` Stephan Mueller
2015-11-01  9:11                       ` [PATCH v2] " Herbert Xu
2015-11-01 11:06                         ` Stephan Mueller
2015-11-01 11:07                         ` Stephan Mueller
2015-11-02  3:12                           ` Herbert Xu
2015-11-05  7:42                             ` Harsh Jain
2015-11-05 12:19                               ` Herbert Xu
2015-11-02  5:48                   ` kernel tainted while exporting shash context using af_alg interface Harsh Jain

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=2725312.7LhRVP0piv@tauon.atsec.com \
    --to=smueller@chronox.de \
    --cc=harshjain.prof@gmail.com \
    --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