Re: general protection fault in blkcipher_walk_done

2017-11-27 Thread Eric Biggers
On Mon, Nov 27, 2017 at 09:37:38PM -0800, Eric Biggers wrote: > On Mon, Nov 27, 2017 at 10:56:47AM -0800, syzbot wrote: > > Hello, > > > > syzkaller hit the following crash on > > 1ea8d039f9edcfefb20d8ddfe136930f6e551529 > > git://git.cmpxchg.org/linux-mmots.git/master > > compiler: gcc (GCC) 7.1.

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

2017-11-27 Thread Stephan Mueller
Am Dienstag, 28. November 2017, 08:29:44 CET schrieb Eric Biggers: Hi Eric, > > Sometimes you have to reboot to get the reproducer to work, because the bug > has to do with referencing counting of the "null skcipher" which is a > global resource. Here's a patch that fixes it, it seems: > > ---

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

2017-11-27 Thread Eric Biggers
On Tue, Nov 28, 2017 at 07:30:46AM +0100, Stephan Mueller wrote: > Am Montag, 27. November 2017, 23:43:08 CET schrieb Eric Biggers: > > Hi Eric, > > > No, that doesn't help. I tested v4.15-rc1 with all the extra commits from > > crypto-2.6.git/master applied: > > > > crypto: algif_aead - sk

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

2017-11-27 Thread Stephan Mueller
Am Montag, 27. November 2017, 23:43:08 CET schrieb Eric Biggers: Hi Eric, > No, that doesn't help. I tested v4.15-rc1 with all the extra commits from > crypto-2.6.git/master applied: > > crypto: algif_aead - skip SGL entries with NULL page > crypto: af_alg - remove locking in async

Re: general protection fault in blkcipher_walk_done

2017-11-27 Thread Eric Biggers
On Mon, Nov 27, 2017 at 10:56:47AM -0800, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 1ea8d039f9edcfefb20d8ddfe136930f6e551529 > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C repro

[PATCH] crypto: arm/aes-neonbs Use PTR_ERR_OR_ZERO()

2017-11-27 Thread Vasyl Gomonovych
Fix ptr_ret.cocci warnings: arch/arm/crypto/aes-neonbs-glue.c:184:1-3: WARNING: PTR_ERR_OR_ZERO can be used arch/arm/crypto/aes-neonbs-glue.c:261:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci

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

2017-11-27 Thread Eric Biggers
On Mon, Nov 27, 2017 at 11:02:08PM +0100, Stephan Müller wrote: > Am Montag, 27. November 2017, 19:56:46 CET schrieb syzbot: > > Hi, > > > Hello, > > > > syzkaller hit the following crash on > > 6fc478f80f6809cc4b1a4230f47a62d3b7378dc0 > > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux

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

2017-11-27 Thread Stephan Müller
Am Montag, 27. November 2017, 19:56:46 CET schrieb syzbot: Hi, > Hello, > > syzkaller hit the following crash on > 6fc478f80f6809cc4b1a4230f47a62d3b7378dc0 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw

Re: [PATCH v2 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-27 Thread Krzysztof Kozlowski
On Mon, Nov 27, 2017 at 10:58 AM, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > MAINTAINERS | 7 + > drivers/char/hw_random/Kconfig | 12 ++ > drivers/char/h

Re: [PATCH v2 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-11-27 Thread Krzysztof Kozlowski
On Mon, Nov 27, 2017 at 10:58 AM, Łukasz Stelmach wrote: > Add binding documentation for the True Random Number Generator > found on Samsung Exynos 5250+ SoCs. > > Acked-by: Rob Herring > Reviewed-by: Krzysztof Kozlowski > Signed-off-by: Łukasz Stelmach A minor nit: add new tags after your Sig

[PATCH v2 3/3] ARM: dts: exynos: Add nodes for True Random Number Generator

2017-11-27 Thread Łukasz Stelmach
Add nodes for the True Random Number Generator found in Samsung Exynos 5250+ SoCs. Signed-off-by: Łukasz Stelmach --- arch/arm/boot/dts/exynos5.dtsi| 5 + arch/arm/boot/dts/exynos5250.dtsi | 5 + arch/arm/boot/dts/exynos5410.dtsi | 5 + arch/arm/boot/dts/exynos5420.dtsi | 5 +

[PATCH v2 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-27 Thread Łukasz Stelmach
Add support for True Random Number Generator found in Samsung Exynos 5250+ SoCs. Signed-off-by: Łukasz Stelmach --- MAINTAINERS | 7 + drivers/char/hw_random/Kconfig | 12 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/exynos-trng.c | 24

[PATCH v2 1/3] dt-bindings: hwrng: Add Samsung Exynos 5250+ True RNG bindings

2017-11-27 Thread Łukasz Stelmach
Add binding documentation for the True Random Number Generator found on Samsung Exynos 5250+ SoCs. Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach --- .../devicetree/bindings/rng/samsung,exynos5250-trng.txt | 17 + 1 file changed, 17 insert

[PATCH v2 0/3] True RNG driver for Samsung Exynos 5250+ SoCs

2017-11-27 Thread Łukasz Stelmach
Hello. The following patches add support for the true random number generator found in Samsung Exynos 5250+ SoCs. Patch #1 adds documentation for devicetree bindings. Patch #2 introduces the driver and appropriate changes in Makefile and Kconfig. Patch #3 adds nodes in devicetree files for Exyn

Re: [PATCH] pkcs7: fix check for self-signed certificate

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > From: Eric Biggers > > pkcs7_validate_trust_one() used 'x509->next == x509' to identify a > self-signed certificate. That's wrong; ->next is simply the link in the > linked list of certificates in the PKCS#7 message. It should be > checking ->signer i

Re: [PATCH] pkcs7: return correct error code if pkcs7_check_authattrs() fails

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > From: Eric Biggers > > If pkcs7_check_authattrs() returns an error code, we should pass that > error code on, rather than using ENOMEM. > > Fixes: 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes > and content type") > Signed-off

Re: [PATCH] X.509: fix buffer overflow detection in sprint_oid()

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > > Fixes: 4f73175d0375 ("X.509: Add utility functions to render OIDs as strings") > Cc: Takashi Iwai > Signed-off-by: Eric Biggers > --- > lib/oid_registry.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: James Morris

Re: [PATCH] X.509: fix comparisons of ->pkey_algo

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > From: Eric Biggers > > ->pkey_algo used to be an enum, but was changed to a string by commit > 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum"). But > two comparisons were not updated. Fix them to use strcmp(). > > This bug broke si

Re: [PATCH] crypto: rsa - fix buffer overread when stripping leading zeroes

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > Fixes: 5a7de97309f5 ("crypto: rsa - return raw integers for the ASN.1 parser") > Cc: # v4.8+ > Cc: Tudor Ambarus > Signed-off-by: Eric Biggers > --- > crypto/rsa_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/crypto

Re: [PATCH] X.509: reject invalid BIT STRING for subjectPublicKey

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") > Cc: # v3.7+ > Signed-off-by: Eric Biggers > --- > crypto/asymmetric_keys/x509_cert_parser.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: James Morris -- James Morris

Re: [PATCH] ASN.1: check for error from ASN1_OP_END__ACT actions

2017-11-27 Thread James Morris
On Sun, 26 Nov 2017, Eric Biggers wrote: > Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") > Cc: # v3.7+ > Signed-off-by: Eric Biggers Reviewed-by: James Morris -- James Morris