CVE-2021-32606 - Use After Free

Severity

78%

Complexity

18%

Confidentiality

98%

In the Linux kernel 5.11 through 5.12.2, isotp_setsockopt in net/can/isotp.c allows privilege escalation to root by leveraging a use-after-free. (This does not affect earlier versions that lack CAN ISOTP SF_BROADCAST support.)

CVSS 3.1 Base Score 7.8. CVSS Attack Vector: local. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

CVSS 2.0 Base Score 7.2. CVSS Attack Vector: local. CVSS Attack Complexity: low. CVSS Vector: (AV:L/AC:L/Au:N/C:C/I:C/A:C).

Demo Examples

Use After Free

CWE-416

The following example demonstrates the weakness.


               
}
free(buf3R2);

Use After Free

CWE-416

The following code illustrates a use after free error:


               
}
free(ptr);
logError("operation aborted before commit", ptr);

When an error occurs, the pointer is immediately freed. However, this pointer is later incorrectly used in the logError function.

Overview

First reported 3 years ago

2021-05-11 23:15:00

Last updated 3 years ago

2021-09-07 22:03:00

Affected Software

Linux Kernel

Fedora 32

32

References

https://www.openwall.com/lists/oss-security/2021/05/11/16

[oss-security] 20210512 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

[oss-security] 20210514 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

[oss-security] 20210514 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

https://www.openwall.com/lists/oss-security/2021/05/11/16

Mailing List, Third Party Advisory

[oss-security] 20210512 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

Mailing List, Third Party Advisory

[oss-security] 20210514 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

Mailing List, Third Party Advisory

[oss-security] 20210514 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

Mailing List, Third Party Advisory

FEDORA-2021-4f852b79d1

FEDORA-2021-bae582b42c

FEDORA-2021-8832eab899

FEDORA-2021-4f852b79d1

Mailing List, Third Party Advisory

FEDORA-2021-bae582b42c

Mailing List, Third Party Advisory

FEDORA-2021-8832eab899

Mailing List, Third Party Advisory

[oss-security] 20210528 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

[oss-security] 20210528 Re: Linux kernel: net/can/isotp: race condition leads to local privilege escalation

Mailing List, Patch, Third Party Advisory

https://security.netapp.com/advisory/ntap-20210625-0001/

https://security.netapp.com/advisory/ntap-20210625-0001/

Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.