Skip to content

Commit 3218552

Browse files
rolandshoemakerpull[bot]
authored andcommitted
debug: add top level security docs for dwarf, elf, macho, pe, and plan9obj
Adds a package level doc comment to the debug/dwarf, debug/elf, debug/macho, debug/pe, and debug/plan9obj noting that these packages are not designed to be hardened against adversarial inputs. Change-Id: I678d01bcdc8ad01c23805f09cc59e64cec6c3f76 Reviewed-on: https://go-review.googlesource.com/c/go/+/435417 Reviewed-by: Damien Neil <[email protected]> Reviewed-by: Julie Qiu <[email protected]> Run-TryBot: Roland Shoemaker <[email protected]> Auto-Submit: Roland Shoemaker <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent a1d4229 commit 3218552

File tree

5 files changed

+57
-7
lines changed

5 files changed

+57
-7
lines changed

src/debug/dwarf/open.go

+13-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package dwarf provides access to DWARF debugging information loaded from
6-
// executable files, as defined in the DWARF 2.0 Standard at
7-
// http://dwarfstd.org/doc/dwarf-2.0.0.pdf
5+
/*
6+
Package dwarf provides access to DWARF debugging information loaded from
7+
executable files, as defined in the DWARF 2.0 Standard at
8+
http://dwarfstd.org/doc/dwarf-2.0.0.pdf.
9+
10+
# Security
11+
12+
This package is not designed to be hardened against adversarial inputs, and is
13+
outside the scope of https://go.dev/security/policy. In particular, only basic
14+
validation is done when parsing object files. As such, care should be taken when
15+
parsing untrusted inputs, as parsing malformed files may consume significant
16+
resources, or cause panics.
17+
*/
818
package dwarf
919

1020
import (

src/debug/elf/file.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package elf implements access to ELF object files.
5+
/*
6+
Package elf implements access to ELF object files.
7+
8+
# Security
9+
10+
This package is not designed to be hardened against adversarial inputs, and is
11+
outside the scope of https://go.dev/security/policy. In particular, only basic
12+
validation is done when parsing object files. As such, care should be taken when
13+
parsing untrusted inputs, as parsing malformed files may consume significant
14+
resources, or cause panics.
15+
*/
616
package elf
717

818
import (

src/debug/macho/file.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package macho implements access to Mach-O object files.
5+
/*
6+
Package macho implements access to Mach-O object files.
7+
8+
# Security
9+
10+
This package is not designed to be hardened against adversarial inputs, and is
11+
outside the scope of https://go.dev/security/policy. In particular, only basic
12+
validation is done when parsing object files. As such, care should be taken when
13+
parsing untrusted inputs, as parsing malformed files may consume significant
14+
resources, or cause panics.
15+
*/
616
package macho
717

818
// High level access to low level data structures.

src/debug/pe/file.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package pe implements access to PE (Microsoft Windows Portable Executable) files.
5+
/*
6+
Package pe implements access to PE (Microsoft Windows Portable Executable) files.
7+
8+
# Security
9+
10+
This package is not designed to be hardened against adversarial inputs, and is
11+
outside the scope of https://go.dev/security/policy. In particular, only basic
12+
validation is done when parsing object files. As such, care should be taken when
13+
parsing untrusted inputs, as parsing malformed files may consume significant
14+
resources, or cause panics.
15+
*/
616
package pe
717

818
import (

src/debug/plan9obj/file.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Package plan9obj implements access to Plan 9 a.out object files.
5+
/*
6+
Package plan9obj implements access to Plan 9 a.out object files.
7+
8+
# Security
9+
10+
This package is not designed to be hardened against adversarial inputs, and is
11+
outside the scope of https://go.dev/security/policy. In particular, only basic
12+
validation is done when parsing object files. As such, care should be taken when
13+
parsing untrusted inputs, as parsing malformed files may consume significant
14+
resources, or cause panics.
15+
*/
616
package plan9obj
717

818
import (

0 commit comments

Comments
 (0)