[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH -mm 7/7] forbid the use of the unshare syscall on ipc namespaces
    Kirill Korotaev wrote:

    > This patch looks as an overkill for me.

    it's a standalone patch. It can be dropped. I think there is some value to
    it as we already agree

    > If you really care about things you describe, you can forbid unsharing
    > in cases:
    > 1.
    > undo_list = tsk->sysvsem.undo_list;
    > if (undo_list)
    > 2. vma exists with vma->vm_ops == &shm_vm_ops;
    > 3. file opened with f_op == &shm_file_operations

    and there are also the netlink sockets mq_notify.

    OK, so we agree that ipc namespaces cannot be unshared without extra
    checks. I like the firewall approach : it's not safe, don't allow it. Which
    is what the patch is doing : we can't unshare ipc namespace safely so let's
    just forbid it :

    if (unshare_flags & CLONE_NEWIPC)
    goto bad_unshare_out;

    simple, nop ? :)

    > I also dislike exec() operation for such sort of things since you can
    > have no executable at hands due to changed fs namespace.

    what do you mean ? fs namespace doesn't change bc you need it to load the
    new process image/interpreter.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-07-11 17:09    [W:0.020 / U:19.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site