diff options
author | Jamie Liu <jamieliu@google.com> | 2019-04-02 18:12:11 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-02 18:13:19 -0700 |
commit | c4caccd54042ea80a6e8b5a8f5ce59ee87a7f424 (patch) | |
tree | 1e4fba0db9c622267fbe76e2393909922b9521e5 /pkg/sentry/kernel | |
parent | 5c465603b67285f04d0b7a38e1bc185b29b4085e (diff) |
Set options on the correct Task in PTRACE_SEIZE.
$ docker run --rm --runtime=runsc -it --cap-add=SYS_PTRACE debian bash -c "apt-get update && apt-get install strace && strace ls"
...
Setting up strace (4.15-2) ...
execve("/bin/ls", ["ls"], [/* 6 vars */]) = 0
brk(NULL) = 0x5646d8c1e000
uname({sysname="Linux", nodename="114ef93d2db3", ...}) = 0
...
PiperOrigin-RevId: 241643321
Change-Id: Ie4bce27a7fb147eef07bbae5895c6ef3f529e177
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/ptrace.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/ptrace.go b/pkg/sentry/kernel/ptrace.go index e8043bf8a..8d78b2fb3 100644 --- a/pkg/sentry/kernel/ptrace.go +++ b/pkg/sentry/kernel/ptrace.go @@ -374,7 +374,7 @@ func (t *Task) ptraceAttach(target *Task, seize bool, opts uintptr) error { return syserror.EPERM } if seize { - if err := t.ptraceSetOptionsLocked(opts); err != nil { + if err := target.ptraceSetOptionsLocked(opts); err != nil { return syserror.EIO } } |