Hi Stephan, I tried your patch on my machine. Kernel is not crashing. The openssl break with this. Can you share HMAC program which you are suspecting it will not work or do you already have some test written in libkcapi/test.sh which will fail. Regards Harsh Jain On Wed, Oct 28, 2015 at 6:25 AM, Stephan Mueller <smueller@xxxxxxxxxx> wrote: > Am Mittwoch, 28. Oktober 2015, 01:09:58 schrieb Stephan Mueller: > > Hi Harsh, > >> >> >> However, any error in user space should not crash the kernel. So, a fix >> should be done. But I think your code is not correct as it solidifies a >> broken user space code. > > After thinking a bit again, I think your approach is correct after all. I was > able to reproduce the crash by simply adding more accept calls to my test > code. And I can confirm that your patch works, for hashes. > > *BUT* it does NOT work for HMAC as the key is set on the TFM and the > subsequent accepts do not transport the key. Albeit your code prevents the > kernel from crashing, the HMAC calculation will be done with an empty key as > the setkey operation does not reach the TFM handle in the subordinate accept() > call. > > So, I would think that the second accept is simply broken, for HMAC at least. > > Herbert, what is the purpose of that subordinate accept that is implemented > with hash_accept? As this is broken for HMACs, should it be removed entirely? > > -- > Ciao > Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html