Vulnerability CVE-2022-41720: Information

Description

On Windows, restricted files can be accessed via os.DirFS and http.Dir. The os.DirFS function and http.Dir type provide access to a tree of files rooted at a given directory. These functions permit access to Windows device files under that root. For example, os.DirFS("C:/tmp").Open("COM1") opens the COM1 device. Both os.DirFS and http.Dir only provide read-only filesystem access. In addition, on Windows, an os.DirFS for the directory (the root of the current drive) can permit a maliciously crafted path to escape from the drive and access any path on the system. With fix applied, the behavior of os.DirFS("") has changed. Previously, an empty root was treated equivalently to "/", so os.DirFS("").Open("tmp") would open the path "/tmp". This now returns an error.

Severity: HIGH (7.5) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Published: Dec. 7, 2022
Modified: Dec. 12, 2022
Error type identifier: CWE-22

Fixed packages

Package name
Branch
Fixed in version
Version from repository
Errata ID
Task #
State
golangsisyphus1.19.4-alt11.22.2-alt1ALT-PU-2022-3297-1311342Fixed
golangsisyphus_riscv641.19.4-alt11.22.2-alt1ALT-PU-2022-7351-1-Fixed
golangp101.18.9-alt11.21.9-alt1ALT-PU-2022-3300-1311343Fixed
golangp91.19.12-alt11.15.15-alt1ALT-PU-2023-5153-1326713Testing
golangc10f11.18.9-alt11.21.9-alt1ALT-PU-2022-3300-1311343Fixed
golangc9f21.18.10-alt0.c9.11.20.11-alt1ALT-PU-2023-1205-1314736Fixed

References to Advisories, Solutions, and Tools

Hyperlink
Resource
https://groups.google.com/g/golang-announce/c/L_3rmdT0BMU/m/yZDrXjIiBQAJ
  • Patch
  • Release Notes
  • Third Party Advisory
https://pkg.go.dev/vuln/GO-2022-1143
  • Patch
  • Vendor Advisory
https://go.dev/cl/455716
  • Patch
  • Vendor Advisory
https://go.dev/issue/56694
  • Issue Tracking
  • Vendor Advisory
    1. Configuration 1

      cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*

      cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*

      Running on/with:
      cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*