Bug 1969489 (CVE-2020-36386)

Summary: CVE-2020-36386 kernel: slab out-of-bounds read in hci_extended_inquiry_result_evt() in net/bluetooth/hci_event.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, allarkin, aquini, bdettelb, bhu, blc, bmasney, brdeoliv, bskeggs, chwhite, crwood, cye, dbohanno, dfreiber, dhoward, doconnor, drow, dvlasenk, esandeen, fhrbata, fpacheco, gtiwari, hdegoede, hkrzesin, jarod, jarodwilson, jburrell, jeremy, jfaracco, jforbes, jlelli, joe.lawrence, jonathan, josef, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lcapitulino, lgoncalv, linville, lzampier, masami256, mchehab, mlangsdo, mleitner, mmilgram, nmurray, ptalbert, qzhao, rogbas, rparrazo, rrobaina, rvrbovsk, rysulliv, scweaver, steved, sukulkar, teagle, tomckay, vkumar, walters, wcosta, williams, wmealing, ycote, ykopkova, zhijwang
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Kernel 5.10 Doc Type: If docs needed, set a value
Doc Text:
A flaw out of bounds memory access in the Linux kernel bluetooth subsystem was found in the way when some data being read about the bluetooth device with the hci_extended_inquiry_result_evt call. A local user could use this flaw to crash the system or read some data out of memory bounds that can lead to data confidentiality threat.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 21:51:05 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: 1969490, 1978595, 1978596, 1978597, 1978598, 1978599, 1978600    
Bug Blocks: 1969492    

Description Guilherme de Almeida Suckevicz 2021-06-08 14:09:18 UTC
An issue was discovered in the Linux kernel before 5.8.1. net/bluetooth/hci_event.c has a slab out-of-bounds read in hci_extended_inquiry_result_evt.

Reference:
https://sites.google.com/view/syzscope/kasan-slab-out-of-bounds-read-in-hci_extended_inquiry_result_evt

Upstream patch:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=51c19bf3d5cfaa66571e4b88ba2a6f6295311101

Comment 1 Guilherme de Almeida Suckevicz 2021-06-08 14:10:03 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1969490]

Comment 2 Justin M. Forbes 2021-06-08 19:01:26 UTC
This was fixed for Fedora with the 5.7.15 stable kernel updates.

Comment 4 Alex 2021-07-02 09:09:01 UTC
Apart from the patch for this issue
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=51c19bf3d5cfaa66571e4b88ba2a6f6295311101
, also need to apply these two patches too (if not yet):
1. commit 629b49c848ee ("Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt()");
2. commit 75bbd2ea50ba ("Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt()").

Comment 12 errata-xmlrpc 2021-11-09 17:23:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4140 https://access.redhat.com/errata/RHSA-2021:4140

Comment 13 errata-xmlrpc 2021-11-09 18:27:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4356 https://access.redhat.com/errata/RHSA-2021:4356

Comment 14 Product Security DevOps Team 2021-11-09 21:51:00 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-36386