deps: update to github.com/cyphar/filepath-securejoin@v0.4.1#4590
deps: update to github.com/cyphar/filepath-securejoin@v0.4.1#4590AkihiroSuda merged 1 commit intoopencontainers:mainfrom
Conversation
|
tests/cmd/seccompagent fails in SecureJoin; with added diagnostics, here's the error
I think this is about trailing diff --git a/tests/cmd/seccompagent/seccompagent.go b/tests/cmd/seccompagent/seccompagent.go
index be1e6c25..9d070474 100644
--- a/tests/cmd/seccompagent/seccompagent.go
+++ b/tests/cmd/seccompagent/seccompagent.go
@@ -144,15 +144,16 @@ func runMkdirForContainer(pid uint32, fileName string, mode uint32, metadata str
// We validated before that metadata is not a string that can make
// newFile a file in a different location other than root.
newFile := fmt.Sprintf("%s-%s", fileName, metadata)
- root := fmt.Sprintf("/proc/%d/cwd/", pid)
+ root := fmt.Sprintf("/proc/%d/cwd", pid)
if strings.HasPrefix(fileName, "/") {
// If it starts with /, use the rootfs as base
- root = fmt.Sprintf("/proc/%d/root/", pid)
+ root = fmt.Sprintf("/proc/%d/root", pid)
}
path, err := securejoin.SecureJoin(root, newFile)
if err != nil {
+ logrus.Errorf("securejoin(%q, %q) error: %v", root, newFile, err)
return err
}I'm not sure how many other real users cyphar/filepath-securejoin#43 breaks; if there will be more, maybe it makes sense to relax the validation slightly (e.g. do not allow |
Oh well, it's not that easy of course. |
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
> go mod edit -replace github.com/opencontainers/runc=github.com/cyphar/runc@securejoin-0.4.0 per opencontainers/runc#4590 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
opencontainers/runc#4590 is needed for Podman to be able to use it, so stay on the previous version for now. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
…n to v0.4.0" This reverts commit 05dcfd3. In particular this commit doesn't build when vendored into podman because runc fails to build with it. opencontainers/runc#4590 This is not visible in storage because runc is not imported here. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
165f564 to
075a5a6
Compare
|
Updated to v0.4.1 which includes a fix for the non-clean paths issue. |
075a5a6 to
3380e2f
Compare
This release includes a minor breaking API change that requires us to rework the types of our wrappers, but there is no practical behaviour change. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3380e2f to
70e500e
Compare
|
Should we backport this to release-1.2? |
Looks like we should, otherwise those who vendor runc could not bump filepath-securejoin. |
This release includes a minor breaking API change that requires us to
rework the types of our wrappers, but there is no practical behaviour
change.
Signed-off-by: Aleksa Sarai cyphar@cyphar.com