All of lore.kernel.org
 help / color / mirror / Atom feed
* [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access
@ 2016-10-24 10:59 Cyrill Gorcunov
  2016-10-24 19:00 ` Andrey Vagin
       [not found] ` <20161024105959.GQ1847-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Cyrill Gorcunov @ 2016-10-24 10:59 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Andrey Vagin, LKML, Pavel Emelyanov

Hi Eric! A few days ago we've noticed that our zombie00 test case started
failing: https://ci.openvz.org/job/CRIU/view/All/job/CRIU-linux-next/406/console
---
======================== Run zdtm/static/zombie00 in h =========================
Start test
./zombie00 --pidfile=zombie00.pid --outfile=zombie00.out
Run criu dump
Run criu restore
Send the 15 signal to  30
Wait for zdtm/static/zombie00(30) to die for 0.100000
################ Test zdtm/static/zombie00 FAIL at result check ################

I've narrowed problem down to commit

 | From ce99dd5fd5f600f9f4f0d37bb8847c1cb7c6e4fc Mon Sep 17 00:00:00 2001
 | From: "Eric W. Biederman" <ebiederm@xmission.com>
 | Date: Thu, 13 Oct 2016 21:23:16 -0500
 | Subject: [PATCH] mm: Add a user_ns owner to mm_struct and fix
 |  ptrace_may_access
 |
 | During exec dumpable is cleared if the file that is being executed is
 | not readable by the user executing the file.  A bug in
 | ptrace_may_access allows reading the file if the executable happens to
 | enter into a subordinate user namespace (aka clone(CLONE_NEWUSER),
 | unshare(CLONE_NEWUSER), or setns(fd, CLONE_NEWUSER).

and the reason is that the zombie tasks do not have task::mm and in resut
we're obtaining -EPERM when trying to read task->exit_code from /proc/pid/stat.

Looking into commit I suspect when mm = NULL we've to move back the test
ptrace_has_cap(__task_cred(task)->user_ns, mode)?

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-10-28  7:06 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 10:59 [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access Cyrill Gorcunov
2016-10-24 19:00 ` Andrey Vagin
     [not found] ` <20161024105959.GQ1847-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2016-10-24 19:01   ` Eric W. Biederman
2016-10-24 19:01     ` Eric W. Biederman
2016-10-24 20:29     ` Cyrill Gorcunov
     [not found]       ` <20161024202925.GS1847-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2016-10-24 21:32         ` Kees Cook
2016-10-24 21:32           ` Kees Cook
2016-10-24 23:11           ` Eric W. Biederman
2016-10-25  9:02             ` Cyrill Gorcunov
2016-10-27 15:54               ` [REVIEW][PATCH v2] mm: Add a user_ns owner to mm_struct and fix ptrace permission checks Eric W. Biederman
2016-10-27 21:27                 ` Kees Cook
     [not found]                 ` <87d1ilrdmt.fsf_-_-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2016-10-27 21:27                   ` Kees Cook
2016-10-27 21:39                   ` Cyrill Gorcunov
2016-10-27 21:39                 ` Cyrill Gorcunov
2016-10-27 22:34                   ` Cyrill Gorcunov
     [not found]                     ` <20161027223430.GC1922-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2016-10-28  2:22                       ` Eric W. Biederman
2016-10-28  2:22                         ` Eric W. Biederman
     [not found]                         ` <8760odnrf5.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2016-10-28  4:45                           ` Eric W. Biederman
2016-10-28  4:45                             ` Eric W. Biederman
     [not found]                             ` <87pomlm68e.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2016-10-28  7:06                               ` Cyrill Gorcunov
2016-10-28  7:06                             ` Cyrill Gorcunov
     [not found]                   ` <20161027213918.GA1922-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2016-10-27 22:34                     ` Cyrill Gorcunov
     [not found]               ` <20161025090213.GX1847-ZmlpmtaulQd+urZeOPWqwQ@public.gmane.org>
2016-10-27 15:54                 ` Eric W. Biederman
     [not found]             ` <8760oh737b.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2016-10-25  9:02               ` [ISSUE] mm: Add a user_ns owner to mm_struct and fix ptrace_may_access Cyrill Gorcunov
     [not found]           ` <CAGXu5jK4p4bbQU1Bu-p9aM1GJ+CAR-FAHZcXXRH0De_M4VQ3wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-24 23:11             ` Eric W. Biederman
     [not found]     ` <8760oh8tbp.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2016-10-24 20:29       ` Cyrill Gorcunov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.