Bug 1980646 (CVE-2021-3640) - CVE-2021-3640 kernel: use-after-free vulnerability in function sco_sock_sendmsg()
Summary: CVE-2021-3640 kernel: use-after-free vulnerability in function sco_sock_sendm...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-3640
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1984638 1984639 1984640 1984641 1984642 1984643 1984957 2066188 2102097 2103443
Blocks: 1980647 1980649
TreeView+ depends on / blocked
 
Reported: 2021-07-09 06:34 UTC by Marian Rehak
Modified: 2023-09-03 11:00 UTC (History)
50 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw use-after-free in function sco_sock_sendmsg() of the Linux kernel HCI subsystem was found in the way user calls ioct UFFDIO_REGISTER or other way triggers race condition of the call sco_conn_del() together with the call sco_sock_sendmsg() with the expected controllable faulting memory page. A privileged local user could use this flaw to crash the system or escalate their privileges on the system.
Clone Of:
Environment:
Last Closed: 2022-12-05 05:34:02 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:7444 0 None None None 2022-11-08 09:09:24 UTC
Red Hat Product Errata RHSA-2022:7683 0 None None None 2022-11-08 10:08:32 UTC
Red Hat Product Errata RHSA-2022:7933 0 None None None 2022-11-15 09:44:13 UTC
Red Hat Product Errata RHSA-2022:8267 0 None None None 2022-11-15 10:46:56 UTC

Description Marian Rehak 2021-07-09 06:34:33 UTC
Unexpected locking behavior leads to a use-after-free vulnerability in function sco_sock_sendmsg() allowing the attacker to inject a malicious payload.

Comment 5 Guilherme de Almeida Suckevicz 2021-07-22 14:28:18 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1984957]

Comment 11 Marian Rehak 2021-08-30 12:09:21 UTC
Hello there,
I asked the reporter via email. (sorry for the dealy, I was PTO last week)

Comment 13 gopal krishna tiwari 2021-10-20 07:44:33 UTC
(In reply to Marian Rehak from comment #11)
> Hello there,
> I asked the reporter via email. (sorry for the dealy, I was PTO last week)

Any update on this ? 

thanks
Gopal

Comment 14 Alex 2021-11-10 17:00:27 UTC
In reply to comment #13:
> 
> (In reply to Marian Rehak from comment #11)
> > Hello there,
> > I asked the reporter via email. (sorry for the dealy, I was PTO last week)
> 
> Any update on this ? 
> 
> thanks
> Gopal

The patch is this one:
https://lkml.org/lkml/2021/8/28/238

(but looks like not applied yet:
https://lore.kernel.org/lkml/20211109010649.1191041-2-sashal@kernel.org/T/
)

Comment 15 Justin M. Forbes 2022-01-05 14:45:01 UTC
This was fixed for Fedora with the 5.15.3 stable kernel updates.

Comment 16 Alex 2022-01-20 11:11:42 UTC
In reply to comment #14:
> In reply to comment #13:
> > 
> > (In reply to Marian Rehak from comment #11)
> > > Hello there,
> > > I asked the reporter via email. (sorry for the dealy, I was PTO last week)
> > 
> > Any update on this ? 
> > 
> > thanks
> > Gopal
> 
> The patch is this one:
> https://lkml.org/lkml/2021/8/28/238
> 
> (but looks like not applied yet:
> https://lore.kernel.org/lkml/20211109010649.1191041-2-sashal@kernel.org/T/
> )

Additional patch that removed buggy code (simplifying the logic):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/bluetooth/sco.c?h=v5.16&id=0771cbb3b97d3c1d68eecd7f00055f599954c34e

Comment 22 errata-xmlrpc 2022-11-08 09:09:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7444 https://access.redhat.com/errata/RHSA-2022:7444

Comment 23 errata-xmlrpc 2022-11-08 10:08:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7683 https://access.redhat.com/errata/RHSA-2022:7683

Comment 24 errata-xmlrpc 2022-11-15 09:44:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:7933 https://access.redhat.com/errata/RHSA-2022:7933

Comment 25 errata-xmlrpc 2022-11-15 10:46:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8267 https://access.redhat.com/errata/RHSA-2022:8267

Comment 26 Product Security DevOps Team 2022-12-05 05:33:56 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-2021-3640


Note You need to log in before you can comment on or make changes to this bug.