Bug 1386286 (CVE-2015-8970)

Summary: CVE-2015-8970 kernel: crypto: GPF in lrw_crypt caused by null-deref
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aquini, bhu, carnil, dhoward, fhrbata, iboverma, jkacur, jross, kernel-mgr, lgoncalv, matt, mcressma, nmurray, pholasek, plougher, rvrbovsk, security-response-team, slawomir, vdronov, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
The lrw_crypt() function in 'crypto/lrw.c' in the Linux kernel before 4.5 allows local users to cause a system crash and a denial of service by the NULL pointer dereference via accept(2) system call for AF_ALG socket without calling setkey() first to set a cipher key.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:00:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1386234, 1391589, 1391590, 1393299, 1393300    
Bug Blocks: 1386287    

Description Adam Mariš 2016-10-18 14:42:09 UTC
The lrw_crypt() function in 'crypto/lrw.c' in the Linux kernel before 4.5 allows local users to cause a system crash and a denial of service by the NULL pointer dereference via accept(2) system call for AF_ALG socket without calling setkey() first to set a cipher key.

Bug Report:

https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ

CVE-ID request+assigning:

http://seclists.org/oss-sec/2016/q4/324

http://seclists.org/oss-sec/2016/q4/330

Related upstream patches:

dd504589577d8e8e70f51f997ad487a4cb6c026f crypto: algif_skcipher - Require setkey before accept(2)
c840ac6af3f8713a71b4d2363419145760bd6044 crypto: af_alg - Disallow bind/setkey/... after accept(2)
a383292c86663bbc31ac62cc0c04fc77504636a6 crypto: af_alg - Fix socket double-free when accept fails
37766586c965d63758ad542325a96d5384f4a8c9 crypto: af_alg - Add nokey compatibility path
a0fa2d037129a9849918a92d91b79ed6c7bd2818 crypto: algif_skcipher - Add nokey compatibility path
a5596d6332787fd383b3b5427b41f94254430827 crypto: hash - Add crypto_ahash_has_setkey
6de62f15b581f920ade22d758f4c338311c2f0d4 crypto: algif_hash - Require setkey before accept(2)
a1383cd86a062fc798899ab20f0ec2116cce39cb crypto: skcipher - Add crypto_skcipher_has_setkey
6e8d8ecf438792ecf7a3207488fb4eebc4edb040 crypto: algif_skcipher - Add key check exception for cipher_null

Comment 1 Vladis Dronov 2016-11-03 14:56:51 UTC
Acknowledgments:

Name: Igor Redko (Virtuozzo), Vasily Averin (Virtuozzo)

Comment 5 Vladis Dronov 2016-11-04 11:17:51 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6 as the code with the flaw is not present in the products listed.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7 and MRG-2. Future Linux kernel updates for the respective releases might address this issue.

Comment 9 errata-xmlrpc 2017-08-01 19:09:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2077 https://access.redhat.com/errata/RHSA-2017:2077

Comment 10 errata-xmlrpc 2017-08-02 07:48:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1842 https://access.redhat.com/errata/RHSA-2017:1842

Comment 11 errata-xmlrpc 2017-08-02 07:49:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1842 https://access.redhat.com/errata/RHSA-2017:1842

Comment 12 errata-xmlrpc 2017-08-08 16:20:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Extended Update Support

Via RHSA-2017:2437 https://access.redhat.com/errata/RHSA-2017:2437

Comment 13 errata-xmlrpc 2017-08-08 18:57:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2017:2444 https://access.redhat.com/errata/RHSA-2017:2444