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: NEW
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: 1984641 1984642 2066188 1984638 1984639 1984640 1984643 1984957
Blocks: 1980649 1980647
TreeView+ depends on / blocked
 
Reported: 2021-07-09 06:34 UTC by Marian Rehak
Modified: 2022-06-24 13:31 UTC (History)
44 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:


Attachments (Terms of Use)

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


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