Linux KernelOperating system · Linux

CVE-2021-47515

MEDIUM · 5.5 CVSS v3.1 Published 2024-05-24
Fix available
A fix is available. Upgrade to 4.14.258 / 4.19.221 or later.
See remediation →
57/100
Remediation priority · Elevated
Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
In the Linux kernel, the following vulnerability has been resolved: seg6: fix the iif in the IPv6 socket control block When an IPv4 packet is received, the ip_rcv_core(...) sets the receiving interface index into the IPv4 socket control block (v5.16-rc4, net/ipv4/ip_input.c line 510): IPCB(skb)->iif = skb->skb_iif; If that IPv4 packet is meant to be encapsulated in an outer IPv6+SRH header, the seg6_do_srh_encap(...) performs the required encapsulation. In this case, the seg6_do_srh_encap function clears the IPv6 socket control block (v5.16-rc4 net/ipv6/seg6_iptunnel.c line 163): memset(IP6CB(skb), 0, sizeof(*IP6CB(skb))); The memset(...) was introduced in commit ef489749aae5 ("ipv6: sr: clear IP6CB(skb) on SRH ip4ip6 encapsulation") a long time ago (2019-01-29). Since the IPv6 socket control block and the IPv4 socket control block share the same memory area (skb->cb), the receiving interface index info is lost (IP6CB(skb)->iif is set to zero). As a side effect, that condition triggers a NULL pointer dereference if commit 0857d6f8c759 ("ipv6: When forwarding count rx stats on the orig netdev") is applied. To fix that issue, we set the IP6CB(skb)->iif with the index of the receiving interface once again.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis
How this class of weakness works · CWE-476

The code follows a pointer that is null, crashing the process. An attacker who can reliably trigger it turns the crash into a denial of service. The fix is checking for null before use and handling the failure path gracefully.

General guidance for the null pointer dereference class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Linux KernelOperating system
Affected:>= 4.14.98, < 4.14.258>= 4.19.20, < 4.19.221>= 4.20.7, < 5.0>= 5.0.1, < 5.4.165>= 5.5, < 5.10.85>= 5.11, < 5.15.8= 5.0= 5.16

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 4.14.258 / 4.19.221 / 5.0 or later
Fixed in 4.14.2584.19.2215.0
Vendor patch git.kernel.org →
Recommended fix High confidence

Linux kernel 5.4.165 or later (or 4.14.258+, 4.19.221+ depending on your branch)

  1. Identify the currently running Linux kernel version using 'uname -r'
  2. Check if the version falls within one of the affected ranges: 4.14.98 to 4.14.257, 4.19.20 to 4.19.220, 4.20.7 to 4.19.x, or 5.0.1 to 5.4.164
  3. Plan a kernel upgrade to a fixed version: for 4.14.x upgrade to >= 4.14.258, for 4.19.x upgrade to >= 4.19.221, for 5.0.x-5.3.x upgrade to >= 5.4.165, or for 5.4.x upgrade to >= 5.4.165
  4. Schedule a maintenance window for the kernel upgrade
  5. Back up critical data before performing the upgrade
  6. Update the kernel package using the distribution's package manager (e.g., apt-get update && apt-get upgrade for Debian/Ubuntu, yum update for RHEL/CentOS)
  7. Reboot the system to load the new kernel
  8. Verify the new kernel version is running with 'uname -r' and confirm it is a fixed version
Caveat Kernel upgrades may require system reboot and could have compatibility implications with custom modules or specific hardware drivers; test in non-production environment first

Generated from the published advisory — verify against the referenced sources before acting.

We can perform the upgrade in your staging environment and verify nothing breaks — typical engagement from $2,850. Get the upgrade done

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-47515 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-47515 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data