CVE-2022-32250 - Use After Free

Severity

78%

Complexity

18%

Confidentiality

98%

net/netfilter/nf_tables_api.c in the Linux kernel through 5.18.1 allows a local user (able to create user/net namespaces) to escalate privileges to root because an incorrect NFT_STATEFUL_EXPR check leads to a use-after-free.

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

Type

Linux

First reported 2 years ago

2022-06-02 21:15:00

Last updated 2 years ago

2022-09-09 20:39:00

Affected Software

Linux Kernel

Debian Linux 9.0

9.0

References

https://www.openwall.com/lists/oss-security/2022/05/31/1

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/net/netfilter?id=520778042ccca019f3ffa136dd0ca565c486cedd

[oss-security] 20220603 Re: Linux Kernel use-after-free write in netfilter

[oss-security] 20220604 Re: Linux Kernel use-after-free write in netfilter

https://www.openwall.com/lists/oss-security/2022/05/31/1

Exploit, Mailing List, Patch, Third Party Advisory

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/net/netfilter?id=520778042ccca019f3ffa136dd0ca565c486cedd

Mailing List, Patch, Vendor Advisory

[oss-security] 20220603 Re: Linux Kernel use-after-free write in netfilter

Exploit, Mailing List, Patch, Third Party Advisory

[oss-security] 20220604 Re: Linux Kernel use-after-free write in netfilter

Mailing List, Patch, Third Party Advisory

https://www.debian.org/security/2022/dsa-5161

https://lists.fedoraproject.org/archives/list/[email protected]/message/UIZTJOJCVVEJVOQSCHE6IJQKMPISHQ5L/

https://bugzilla.redhat.com/show_bug.cgi?id=2092427

https://lists.fedoraproject.org/archives/list/[email protected]/message/MO6Y3TC4WUUNKRP7OQA26OVTZTPCS6F2/

[oss-security] 20220620 Re: Linux Kernel use-after-free write in netfilter

[debian-lts-announce] 20220701 [SECURITY] [DLA 3065-1] linux security update

[oss-security] 20220703 Re: Linux kernel: Netfilter heap buffer overflow: Is this CVE-2022-32250?

[oss-security] 20220703 Linux kernel: Netfilter heap buffer overflow: Is this CVE-2022-32250?

DSA-5173

https://security.netapp.com/advisory/ntap-20220715-0005/

[oss-security] 20220825 Re: Linux Kernel use-after-free write in netfilter

https://github.com/theori-io/CVE-2022-32250-exploit

https://blog.theori.io/research/CVE-2022-32250-linux-kernel-lpe-2022/

[oss-security] 20220902 Re: Linux Kernel use-after-free write in netfilter

https://www.debian.org/security/2022/dsa-5161

Third Party Advisory

https://lists.fedoraproject.org/archives/list/[email protected]/message/UIZTJOJCVVEJVOQSCHE6IJQKMPISHQ5L/

Mailing List, Third Party Advisory

https://bugzilla.redhat.com/show_bug.cgi?id=2092427

Issue Tracking, Third Party Advisory

https://lists.fedoraproject.org/archives/list/[email protected]/message/MO6Y3TC4WUUNKRP7OQA26OVTZTPCS6F2/

Mailing List, Third Party Advisory

[oss-security] 20220620 Re: Linux Kernel use-after-free write in netfilter

Mailing List, Third Party Advisory

[debian-lts-announce] 20220701 [SECURITY] [DLA 3065-1] linux security update

Mailing List, Third Party Advisory

[oss-security] 20220703 Re: Linux kernel: Netfilter heap buffer overflow: Is this CVE-2022-32250?

Mailing List, Third Party Advisory

[oss-security] 20220703 Linux kernel: Netfilter heap buffer overflow: Is this CVE-2022-32250?

Mailing List, Third Party Advisory

DSA-5173

Third Party Advisory

https://security.netapp.com/advisory/ntap-20220715-0005/

Third Party Advisory

[oss-security] 20220825 Re: Linux Kernel use-after-free write in netfilter

Mailing List, Patch, Third Party Advisory

https://github.com/theori-io/CVE-2022-32250-exploit

Exploit, Third Party Advisory

https://blog.theori.io/research/CVE-2022-32250-linux-kernel-lpe-2022/

Exploit, Third Party Advisory

[oss-security] 20220902 Re: Linux Kernel use-after-free write in netfilter

Mailing List, 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.