Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath package, as well as bug fixes to the linker, the runtime, the compiler, and the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone on our issue tracker for details:
from the security mailing:
[security] Go 1.21.4 and Go 1.20.11 are released
Hello gophers,
We have just released Go versions 1.21.4 and 1.20.11, minor point releases.
These minor releases include 2 security fixes following the security policy:
path/filepath: recognize
\??\
as a Root Local Device path prefix.On Windows, a path beginning with
\??\
is a Root Local Device path equivalentto a path beginning with
\\?\
. Paths with a\??\
prefix may be used toaccess arbitrary locations on the system. For example, the path
\??\c:\x
is equivalent to the more common path c:\x.
The filepath package did not recognize paths with a
\??\
prefix as special.Clean could convert a rooted path such as
\a\..\??\b
intothe root local device path
\??\b
. It will now convert thispath into
.\??\b
.IsAbs
did not report paths beginning with\??\
as absolute.It now does so.
VolumeName now reports the
\??\
prefix as a volume name.Join(
`,??
,b
)could convert a seemingly innocent sequence of path elements into the root local device path
??\b. It will now convert this to
.??\b`.This is CVE-2023-45283 and https://go.dev/issue/63713.
path/filepath: recognize device names with trailing spaces and superscripts
The
IsLocal
function did not correctly detect reserved names in some cases:IsLocal
now correctly reports these names as non-local.This is CVE-2023-45284 and https://go.dev/issue/63713.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)