CyberSecBulletin
CVE-2022-22178NVD status: Modified

Junos OS: Stack-based Buffer Overflow

CVE-2022-22178 is a high-severity stack-based buffer overflow vulnerability in Junos OS from Juniper Networks, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 20.4R3-S2, 21.1R2-S1, 21.1R3, 21.2R2 as the first without the flaw, so updating Junos OS to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.98% chance of exploitation within 30 days, higher than 63% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Junos OS to 20.4R3-S2 or 21.1R2-S1, 21.1R3 or 21.2R2 or 21.3R2, whichever matches your release line, or a later version.
  2. Read the advisory on kb.juniper.net for workarounds and exact fixed builds.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Juniper NetworksJunos OS20.4 up to, but not including, 20.4R3-S2; 21.1 up to, but not including, 21.1R2-S1, 21.1R3; 21.2 up to, but not including, 21.2R2; 21.3 up to, but not including, 21.3R220.4R3-S2, 21.1R2-S1, 21.1R3, 21.2R2, 21.3R2
Juniper NetworksJunos20.4; 21.1; 21.2; 21.3Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
NoneNo data is disclosed.
Integrity
NoneNothing can be modified.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.5HighCNA (juniper.net)
CVSS 3.17.5HighNVD
CVSS 2.05.0MediumNVD

Official description

A Stack-based Buffer Overflow vulnerability in the flow processing daemon (flowd) of Juniper Networks Junos OS on MX Series and SRX series allows an unauthenticated networked attacker to cause a flowd crash and thereby a Denial of Service (DoS). Continued receipt of these specific packets will cause a sustained Denial of Service condition. This issue can be triggered by a specific Session Initiation Protocol (SIP) invite packet if the SIP ALG is enabled. Due to this, the PIC will be rebooted and all traffic that traverses the PIC will be dropped. This issue affects: Juniper Networks Junos OS 20.4 versions prior to 20.4R3-S2; 21.1 versions prior to 21.1R2-S1, 21.1R3; 21.2 versions prior to 21.2R2; 21.3 versions prior to 21.3R2. This issue does not affect Juniper Networks Junos OS versions prior to 20.4R1.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Stack-based Buffer Overflow

The product writes past the end of a buffer that was allocated on the stack.

How developers prevent this class of flaw

  • Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
  • Use an abstraction library to abstract away risky APIs. Not a complete solution.
  • Implement and perform bounds checking on input.

More Stack-based Buffer Overflow vulnerabilities (CWE-121)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in Junos OS

All Junos OS vulnerabilities

Recent Stack-based Buffer Overflow vulnerabilities

Spotted an error? Tell us.