Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2022-46770

Infinite loop in console output on xen
Back to all
CVE

CVE-2022-46770

Infinite loop in console output on xen

Background

MirageOS is a library operating system using cooperative multitasking, which can be executed as a guest of the Xen hypervisor. Output on the console is performed via the Xen console protocol.

Problem Description

Since MirageOS moved from PV mode to PVH, and thus replacing Mini-OS with solo5, there was an issue in the solo5 code which failed to properly account the already written bytes on the console. This only occurs if the output to be performed does not fit in a single output buffer (2048 bytes on Xen).

The code in question set the number of bytes written to the last written count (written = outputsome(buf)), instead of increasing the written count (written += outputsome(buf)).

Impact

Console output may lead to an infinite loop, endlessly printing data onto the console.

A prominent unikernel is the Qubes MirageOS firewall, which prints some input packets onto the console. This can lead to a remote denial of service vulnerability, since any client could send a malformed and sufficiently big network packet.

Solution

The solution is to fix the console output code in solo5, as done in https://github.com/Solo5/solo5/pull/538/commits/099be86f0a17a619fcadbb970bb9e511d28d3cd8

Timeline

  • 2022-12-04: initial report by Krzysztof Burghardt https://github.com/mirage/qubes-mirage-firewall/issues/166
  • 2022-12-04: investigation by Hannes Mehnert and Pierre Alain
  • 2022-12-05: initial fix by Pierre Alain https://github.com/Solo5/solo5/pull/538
  • 2022-12-05: review of fix by Thomas Leonard
  • 2022-12-07: release of fixed packages and security advisory

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/Solo5/solo5/pull/538, https://mirageos.org/blog/MSA03

Severity

7.5

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.5
EPSS Probability
0.16905%
EPSS Percentile
0.94981%
Introduced Version
0.6.6,f4b47d11983bf8f32aaf4ec496a045c35e4e582f
Fix Available
0.7.5,099be86f0a17a619fcadbb970bb9e511d28d3cd8

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading