Skip to content

Commit 486ec2a

Browse files
authored
Merge pull request #11 from thaJeztah/remove_init
chrootarchive: remove redundant "init" mitigation for CVE-2019-14271
2 parents 9ec1e6e + f12e6e1 commit 486ec2a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

chrootarchive/archive_unix.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@ package chrootarchive
55
import (
66
"errors"
77
"io"
8-
"net"
9-
"os/user"
108
"path/filepath"
119
"strings"
1210

1311
"github.com/moby/go-archive"
1412
)
1513

16-
func init() {
17-
// initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host
18-
// environment not in the chroot from untrusted files.
19-
_, _ = user.Lookup("docker")
20-
_, _ = net.LookupHost("localhost")
21-
}
22-
2314
func invokeUnpack(decompressedArchive io.Reader, dest string, options *archive.TarOptions, root string) error {
2415
relDest, err := resolvePathInChroot(root, dest)
2516
if err != nil {

0 commit comments

Comments
 (0)