Re: PBKDF2 support in the linux kernel

2018-05-26 Thread Theodore Y. Ts'o
On Sat, May 26, 2018 at 03:36:37PM +0200, Stephan Mueller wrote: > - security related code should be vetted (which arguably is the case when the > discussed PBKDF is part of the kernel) > > > > If he/she were to add their own userland code then he would surely be > > criticized for rolling his ow

Re: KASAN: use-after-free Read in crypto_destroy_tfm

2018-05-26 Thread Dmitry Vyukov
On Sat, May 26, 2018 at 7:40 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:0644f186fc9d Merge tag 'for_linus' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=102bc25780 > kernel config:

KASAN: use-after-free Read in crypto_destroy_tfm

2018-05-26 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:0644f186fc9d Merge tag 'for_linus' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=102bc25780 kernel config: https://syzkaller.appspot.com/x/.config?x=61c12b53c2a25ec4 da

Re: [PATCH] crypto: x86/aegis256 - Fix wrong key buffer size

2018-05-26 Thread Herbert Xu
On Sun, May 20, 2018 at 10:57:23AM +0200, Ondrej Mosnáček wrote: > From: Ondrej Mosnacek > > AEGIS-256 key is two blocks, not one. > > Fixes: 1d373d4e8e15 ("crypto: x86 - Add optimized AEGIS implementations") > Reported-by: Eric Biggers > Signed-off-by: Ondrej Mosnacek Patch applied. Thanks.

Re: [PATCH 0/6] crypto: crc32 cleanups and unkeyed tests

2018-05-26 Thread Herbert Xu
On Sat, May 19, 2018 at 10:07:36PM -0700, Eric Biggers wrote: > This series fixes up alignment for crc32-generic and crc32c-generic, > removes test vectors for bfin_crc that are no longer needed, and adds > unkeyed test vectors for crc32 and an extra unkeyed test vector for > crc32c. Adding the un

Re: [PATCH] crypto: chtls - fix a missing-check bug

2018-05-26 Thread Herbert Xu
On Fri, May 18, 2018 at 02:55:35PM -0500, Wenwen Wang wrote: > In do_chtls_setsockopt(), the tls crypto info is first copied from the > poiner 'optval' in userspace and saved to 'tmp_crypto_info'. Then the > 'version' of the crypto info is checked. If the version is not as expected, > i.e., TLS_1_2

Re: [PATCH] crypto: inside-secure - do not use memset on MMIO

2018-05-26 Thread Herbert Xu
On Thu, May 17, 2018 at 03:22:14PM +0200, Antoine Tenart wrote: > This patch fixes the Inside Secure driver which uses a memtset() call to > set an MMIO area from the cryptographic engine to 0. This is wrong as > memset() isn't guaranteed to work on MMIO for many reasons. This led to > kernel pagin

Re: [PATCH v2 00/10] crypto: inside-secure - AEAD support

2018-05-26 Thread Herbert Xu
On Mon, May 14, 2018 at 03:10:54PM +0200, Antoine Tenart wrote: > This series brings AEAD algorithms to the Inside Secure SafeXcel driver. > The first 7 commits rework the driver to allow the future AEAD addition, > and then 3 commits add AEAD functions and 3 algorithms. > > This is based on top o

Re: [PATCH] crypto: chtls: generic handling of data and hdr

2018-05-26 Thread Herbert Xu
On Mon, May 14, 2018 at 04:41:38PM +0530, Atul Gupta wrote: > removed redundant check and made TLS PDU and header recv > handling common as received from HW. > Ensure that only tls header is read in cpl_rx_tls_cmp > read-ahead and skb is freed when entire data is processed. > > Signed-off-by: Atul

Re: PBKDF2 support in the linux kernel

2018-05-26 Thread Stephan Mueller
Am Samstag, 26. Mai 2018, 14:17:11 CEST schrieb Jeffrey Walton: Hi Jeffrey, > On Thu, May 24, 2018 at 5:11 AM, Stephan Mueller wrote: > > Am Donnerstag, 24. Mai 2018, 10:33:07 CEST schrieb Rafael J. Wysocki: > > > > Hi Rafael, > > > >> So the problem is that Yu would like to use this for hibe

Re: PBKDF2 support in the linux kernel

2018-05-26 Thread Jeffrey Walton
On Thu, May 24, 2018 at 5:11 AM, Stephan Mueller wrote: > Am Donnerstag, 24. Mai 2018, 10:33:07 CEST schrieb Rafael J. Wysocki: > > Hi Rafael, > >> So the problem is that Yu would like to use this for hibernation encryption >> done entirely in the kernel. > > But why do you need to perform PBKDF i

Re: WARNING: kernel stack regs has bad 'bp' value (3)

2018-05-26 Thread Eric Biggers
On Sat, May 12, 2018 at 10:43:08AM +0200, Dmitry Vyukov wrote: > On Fri, Feb 2, 2018 at 11:18 PM, Eric Biggers wrote: > > On Fri, Feb 02, 2018 at 02:57:32PM +0100, Dmitry Vyukov wrote: > >> On Fri, Feb 2, 2018 at 2:48 PM, syzbot > >> wrote: > >> > Hello, > >> > > >> > syzbot hit the following cra

[PATCH 1/2] crypto: x86/salsa20 - remove x86 salsa20 implementations

2018-05-26 Thread Eric Biggers
From: Eric Biggers The x86 assembly implementations of Salsa20 use the frame base pointer register (%ebp or %rbp), which breaks frame pointer convention and breaks stack traces when unwinding from an interrupt in the crypto code. Recent (v4.10+) kernels will warn about this, e.g. WARNING: kernel

[PATCH 2/2] crypto: salsa20 - Revert "crypto: salsa20 - export generic helpers"

2018-05-26 Thread Eric Biggers
From: Eric Biggers This reverts commit eb772f37ae8163a89e28a435f6a18742ae06653b, as now the x86 Salsa20 implementation has been removed and the generic helpers are no longer needed outside of salsa20_generic.c. We could keep this just in case someone else wants to add a new optimized Salsa20 imp

[PATCH 0/2] crypto: remove x86 salsa20 implementations

2018-05-26 Thread Eric Biggers
Hello, The x86 asm implementations of Salsa20 have been missed so far in the fixes to stop abusing %ebp/%rbp in asm code to get correct stack traces. This has been causing the unwinder warnings reported by syzkaller to continue. This series "fixes" it by just removing the offending salsa20-asm im