CVE-2021-38297 Memory corruption in n/a

Critical 9.8 Published Updated

A buffer overflow in the Go runtime allows attackers to execute arbitrary code or cause denial of service via large arguments in WASM modules.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-38297?

CVE-2021-38297 is a critical memory corruption vulnerability in Fedoraproject Fedora, published on 18 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Go before 1.16.9 and 1.17.x before 1.17.2 has a Buffer Overflow via large arguments in a function invocation from a WASM module, when GOARCH=wasm GOOS=js is used.

Weakness: CWE-120

Which versions are affected by CVE-2021-38297?

2 open source packages ship an affected version, including golang and toolchain. It affects 2 products.

PackageAffectedFixed in
golang BitnamiAll versions1.16.9, 1.17.2
toolchain GoAll versions1.16.9, 1.17.2
Linux distribution packages (11)
go1.16 SUSE:Linux Enterprise Module for Development Tools 15 SP2All versions1.16.9-1.29.1
go1.17 SUSE:Linux Enterprise Module for Development Tools 15 SP2All versions1.17.2-1.6.2
go1.16 SUSE:Linux Enterprise Module for Development Tools 15 SP3All versions1.16.9-1.29.1
go1.17 SUSE:Linux Enterprise Module for Development Tools 15 SP3All versions1.17.2-1.6.2
go1.16 openSUSE:Leap 15.2All versions1.16.9-lp152.14.1
go1.16 openSUSE:Leap 15.3All versions1.16.9-1.29.1
go1.17 openSUSE:Leap 15.3All versions1.17.2-1.6.2
go1.16 openSUSE:TumbleweedAll versions1.16.9-1.1
go1.17 openSUSE:TumbleweedAll versions1.17.2-1.1
google-guest-agent openSUSE:TumbleweedAll versions20230221.00-2.1
google-osconfig-agent openSUSE:TumbleweedAll versions20230222.00-2.1

Products include Fedoraproject Fedora, Golang Go.

How do I fix CVE-2021-38297?

Upgrade golang to a fixed version for your release line: 1.16.9 or 1.17.2.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-38297 being exploited?

There is no known exploitation of CVE-2021-38297 in the wild and no public exploit code.

Public exploit code: 2 proofs of concept on GitHub.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as AZL-6450, BIT-golang-2021-38297, DEBIAN-CVE-2021-38297, GHSA-xv38-944c-p763, GO-2022-0247, SUSE-SU-2021:3487-1 and 9 more.

Is CVE-2021-38297 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free