cve.bz

CVE-2022-27666 Out-of-bounds Write

7.8 highEPSS 5.5%Fix available

High (7.8). EPSS 5.5% estimated probability of exploitation activity in the next 30 days.

On this page
A heap buffer overflow flaw was found in IPsec ESP transformation code in net/ipv4/esp4.c and net/ipv6/esp6.c. This flaw allows a local attacker with a normal user privilege to overwrite kernel heap objects and may cause a local privilege escalation threat.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
5.5% (unchanged from 5.5% a week ago; 5.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 93rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-27666 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-27666?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-27666?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-27666 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
linux:linux_kernelfrom 4.11 before 4.14.274
linux:linux_kernelfrom 4.15 before 4.19.237
linux:linux_kernelfrom 4.20 before 5.4.188
linux:linux_kernelfrom 5.5 before 5.10.108
linux:linux_kernelfrom 5.11 before 5.15.29
linux:linux_kernelfrom 5.16 before 5.16.15
linux:linux_kernel5.17:rc1
linux:linux_kernel5.17:rc2
linux:linux_kernel5.17:rc3
linux:linux_kernel5.17:rc4
linux:linux_kernel5.17:rc5
linux:linux_kernel5.17:rc6
linux:linux_kernel5.17:rc7
fedoraproject:fedora34
fedoraproject:fedora35
redhat:virtualization4.0
redhat:enterprise_linux8.0
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10linux4.19.249-2DSA-5173-1
Debian11linux5.10.113-1DSA-5127-1
Debian12, 13, 14linux5.16.18-1DEBIAN-CVE-2022-27666
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2022-27666
Ubuntu18.04:LTSlinux4.15.0-175.184UBUNTU-CVE-2022-27666 USN-5357-1
Ubuntu18.04:LTSlinux-aws4.15.0-1126.135UBUNTU-CVE-2022-27666 USN-5357-1
Ubuntu18.04:LTSlinux-aws-5.45.4.0-1071.76~18.04.1UBUNTU-CVE-2022-27666 USN-5358-2
Ubuntu18.04:LTSlinux-azure-4.154.15.0-1136.149UBUNTU-CVE-2022-27666 USN-5357-1
Ubuntu18.04:LTSlinux-azure-5.45.4.0-1074.77~18.04.1UBUNTU-CVE-2022-27666 USN-5358-2
Ubuntu18.04:LTSlinux-dell300x4.15.0-1040.45UBUNTU-CVE-2022-27666 USN-5357-1
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 10 moreno fix listedUBUNTU-CVE-2022-27666
Ubuntu18.04:LTSlinux-gcp-4.154.15.0-1120.134UBUNTU-CVE-2022-27666 USN-5357-2
Ubuntu18.04:LTSlinux-gcp-5.45.4.0-1069.73~18.04.1UBUNTU-CVE-2022-27666 USN-5358-2
Ubuntu18.04:LTSlinux-gke-5.45.4.0-1067.70~18.04.1UBUNTU-CVE-2022-27666 USN-5358-2
Ubuntu18.04:LTSlinux-gkeop-5.45.4.0-1038.39~18.04.1UBUNTU-CVE-2022-27666 USN-5358-2
47 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::baseoskpatch-patch-4_18_0-372_9_1, kpatch-patch-4_18_0-372_9_1-debuginfo, kpatch-patch-4_18_0-372_9_1-debugsource0:1-1.el8RHSA-2022:5219
Red Hatenterprise_linux:8::baseosperf, kernel, bpftool and 30 more0:4.18.0-372.13.1.el8_6RHSA-2022:5316
Red Hatenterprise_linux:8::crbperf-debuginfo, kernel-debuginfo, bpftool-debuginfo and 7 more0:4.18.0-372.13.1.el8_6RHSA-2022:5316
Red Hatenterprise_linux:8::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 12 more0:4.18.0-372.13.1.rt7.170.el8_6RHSA-2022:5344
Red Hatenterprise_linux:8::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 10 more0:4.18.0-372.13.1.rt7.170.el8_6RHSA-2022:5344
Red Hatenterprise_linux:9::appstreamperf, kernel-doc, kernel-devel and 16 more0:5.14.0-70.17.1.el9_0RHSA-2022:5249
Red Hatenterprise_linux:9::baseoskernel, bpftool, kernel-core and 25 more0:5.14.0-70.17.1.el9_0RHSA-2022:5249
Red Hatenterprise_linux:9::baseoskpatch-patch-5_14_0-70_13_1, kpatch-patch-5_14_0-70_13_1-debuginfo, kpatch-patch-5_14_0-70_13_1-debugsource0:1-1.el9_0RHSA-2022:5214
Red Hatenterprise_linux:9::crbperf-debuginfo, kernel-debuginfo, bpftool-debuginfo and 9 more0:5.14.0-70.17.1.el9_0RHSA-2022:5249
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 12 more0:5.14.0-70.17.1.rt21.89.el9_0RHSA-2022:5267
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 10 more0:5.14.0-70.17.1.rt21.89.el9_0RHSA-2022:5267
Red Hatrhel_e4s:8.1::baseoskpatch-patch-4_18_0-147_51_1, kpatch-patch-4_18_0-147_51_1-debuginfo, kpatch-patch-4_18_0-147_51_1-debugsource0:1-8.el8_1RHSA-2022:4942
35 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 8 morekernel-default-base5.3.18-150200.24.112.1.150200.9.52.2SUSE-SU-2022:1197-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 3 morekernel-docs, kernel-syms, kernel-source and 3 more5.3.18-150200.24.112.1SUSE-SU-2022:1197-1
SUSELinux Enterprise High Availability Extension 12 SP4, Linux Enterprise Live Patching 12 SP4kernel-default4.12.14-95.96.1SUSE-SU-2022:1267-1
SUSELinux Enterprise High Availability Extension 12 SP5, Linux Enterprise Live Patching 12 SP5, Linux Enterprise Workstation Extension 12 SP5kernel-default4.12.14-122.116.1SUSE-SU-2022:1196-1
SUSELinux Enterprise High Availability Extension 15 SP2, Linux Enterprise Live Patching 15 SP2, Linux Enterprise Micro 5.0kernel-default5.3.18-150200.24.112.1SUSE-SU-2022:1197-1
SUSELinux Enterprise High Availability Extension 15 SP3, Linux Enterprise Live Patching 15 SP3, Linux Enterprise Micro 5.1 and 2 morekernel-default5.3.18-150300.59.63.1SUSE-SU-2022:1183-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_2014-2.2SUSE-SU-2022:1303-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_2113-2.1SUSE-SU-2022:1182-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_2211-2.1SUSE-SU-2022:1182-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_236-2.1SUSE-SU-2022:1182-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_243-2.1SUSE-SU-2022:1248-1
SUSELinux Enterprise Live Patching 12 SP4kgraft-patch-SLE12-SP4_Update_252-2.1SUSE-SU-2022:1268-1
66 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3dtb-aarch64, kernel-64kb, kernel-docs and 9 more5.3.18-150300.59.63.1SUSE-SU-2022:1183-1
openSUSELeap 15.3kernel-azure, kernel-syms-azure, kernel-source-azure5.3.18-150300.38.53.1SUSE-SU-2022:1163-1
openSUSELeap 15.3kernel-default-base5.3.18-150300.59.63.1.150300.18.39.1SUSE-SU-2022:1183-1
AlmaLinux8kernel-rt, kernel-rt-kvm, kernel-rt-core and 9 more4.18.0-372.13.1.rt7.170.el8_6ALSA-2022:5344
AlmaLinux8perf, kernel, bpftool and 16 more4.18.0-372.13.1.el8_6ALSA-2022:5316
AlmaLinux9kernel-rt, kernel-rt-kvm, kernel-rt-core and 9 more5.14.0-70.17.1.rt21.89.el9_0ALSA-2022:5267
AlmaLinux9perf, kernel, bpftool and 25 more5.14.0-70.17.1.el9_0ALSA-2022:5249
Rocky Linux8kernel0:4.18.0-372.13.1.el8_6RLSA-2022:5316
Rocky Linux8kernel-rt0:4.18.0-372.13.1.rt7.170.el8_6RLSA-2022:5344
Azure Linux2hyperv-daemons5.15.92.1-1AZL-13228
Azure Linux2kernel5.15.32.1-3AZL-9120

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

The given exploit needs CAP_NET_ADMIN to set up IPsec SA and a user namespace is used to get that capability, so disabling unprivileged user namespaces gives some protection.

~~~

On non-containerized deployments of Red Hat Enterprise Linux 8, you can disable user namespaces by setting user.max_user_namespaces to 0:

# echo "user.max_user_namespaces=0" > /etc/sysctl.d/userns.conf

# sysctl -p /etc/sysctl.d/userns.conf

On containerized deployments, such as Red Hat OpenShift Container Platform, do not use this mitigation as the functionality is needed to be enabled.

~~~

Note: If the target system is already using IPsec and has SA configured, then no additional privileges are needed to exploit the issue.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8kernel-rt-0:4.18.0-372.13.1.rt7.170.el8_6Fixed 2022-06-28RHSA-2022:5344
Red Hat Enterprise Linux 8kpatch-patchFixed 2022-06-28RHSA-2022:5219
Red Hat Enterprise Linux 8kernel-0:4.18.0-372.13.1.el8_6Fixed 2022-06-30RHSA-2022:5316
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionskernel-0:4.18.0-147.67.1.el8_1Fixed 2022-06-07RHSA-2022:4924
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionskpatch-patchFixed 2022-06-08RHSA-2022:4942
Red Hat Enterprise Linux 8.2 Extended Update Supportkernel-rt-0:4.18.0-193.87.1.rt13.137.el8_2Fixed 2022-06-28RHSA-2022:5224
Red Hat Enterprise Linux 8.2 Extended Update Supportkernel-0:4.18.0-193.87.1.el8_2Fixed 2022-06-28RHSA-2022:5220
Red Hat Enterprise Linux 8.2 Extended Update Supportkpatch-patchFixed 2022-07-01RHSA-2022:5476
Red Hat Enterprise Linux 8.4 Extended Update Supportkernel-rt-0:4.18.0-305.49.1.rt7.121.el8_4Fixed 2022-05-31RHSA-2022:4835
Red Hat Enterprise Linux 8.4 Extended Update Supportkpatch-patchFixed 2022-05-31RHSA-2022:4809
Red Hat Enterprise Linux 8.4 Extended Update Supportkernel-0:4.18.0-305.49.1.el8_4Fixed 2022-05-31RHSA-2022:4829
Red Hat Enterprise Linux 9kernel-0:5.14.0-70.17.1.el9_0Fixed 2022-07-01RHSA-2022:5249
Red Hat Enterprise Linux 9kernel-rt-0:5.14.0-70.17.1.rt21.89.el9_0Fixed 2022-06-28RHSA-2022:5267
Red Hat Enterprise Linux 9kpatch-patchFixed 2022-06-28RHSA-2022:5214
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8kernel-0:4.18.0-372.13.1.el8_6Fixed 2022-06-30RHSA-2022:5316
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8redhat-virtualization-host-0:4.5.1-202207170705_8.6Fixed 2022-07-21RHSA-2022:5678
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-27666.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

References

Check your stackJSON