14 Jul, 2020

3 commits

  • For both pidfd and seccomp, the __user pointer is not used. Update
    __receive_fd() to make writing to ufd optional via a NULL check. However,
    for the receive_fd_user() wrapper, ufd is NULL checked so an -EFAULT
    can be returned to avoid changing the SCM_RIGHTS interface behavior. Add
    new wrapper receive_fd() for pidfd and seccomp that does not use the ufd
    argument. For the new helper, the allocated fd needs to be returned on
    success. Update the existing callers to handle it.

    Cc: Alexander Viro
    Cc: linux-fsdevel@vger.kernel.org
    Reviewed-by: Sargun Dhillon
    Acked-by: Christian Brauner
    Signed-off-by: Kees Cook

    Kees Cook
     
  • In preparation for users of the "install a received file" logic outside
    of net/ (pidfd and seccomp), relocate and rename __scm_install_fd() from
    net/core/scm.c to __receive_fd() in fs/file.c, and provide a wrapper
    named receive_fd_user(), as future patches will change the interface
    to __receive_fd().

    Additionally add a comment to fd_install() as a counterpoint to how
    __receive_fd() interacts with fput().

    Cc: Alexander Viro
    Cc: "David S. Miller"
    Cc: Jakub Kicinski
    Cc: Dmitry Kadashev
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Sargun Dhillon
    Cc: Ido Schimmel
    Cc: Ioana Ciornei
    Cc: linux-fsdevel@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Reviewed-by: Sargun Dhillon
    Acked-by: Christian Brauner
    Signed-off-by: Kees Cook

    Kees Cook
     
  • Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup
    scm_detach_fds") into the compat code.

    Replace open-coded __receive_sock() with a call to the helper.

    Move the check added in commit 1f466e1f15cf ("net: cleanly handle kernel
    vs user buffers for ->msg_control") to before the compat call, even
    though it should be impossible for an in-kernel call to also be compat.

    Correct the int "flags" argument to unsigned int to match fd_install()
    and similar APIs.

    Regularize any remaining differences, including a whitespace issue,
    a checkpatch warning, and add the check from commit 6900317f5eff ("net,
    scm: fix PaX detected msg_controllen overflow in scm_detach_fds") which
    fixed an overflow unique to 64-bit. To avoid confusion when comparing
    the compat handler to the native handler, just include the same check
    in the compat handler.

    Cc: Christoph Hellwig
    Cc: Sargun Dhillon
    Cc: Jakub Kicinski
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Christian Brauner
    Signed-off-by: Kees Cook

    Kees Cook
     

14 May, 2020

1 commit

  • The code had historically been ignoring these errors, and my recent
    refactoring changed that, which broke ssh in some setups.

    Fixes: 2618d530dd8b ("net/scm: cleanup scm_detach_fds")
    Reported-by: Ido Schimmel
    Signed-off-by: Christoph Hellwig
    Tested-by: Ido Schimmel
    Tested-by: Ioana Ciornei
    Signed-off-by: David S. Miller

    Christoph Hellwig
     

12 May, 2020

3 commits

  • The msg_control field in struct msghdr can either contain a user
    pointer when used with the recvmsg system call, or a kernel pointer
    when used with sendmsg. To complicate things further kernel_recvmsg
    can stuff a kernel pointer in and then use set_fs to make the uaccess
    helpers accept it.

    Replace it with a union of a kernel pointer msg_control field, and
    a user pointer msg_control_user one, and allow kernel_recvmsg operate
    on a proper kernel pointer using a bitfield to override the normal
    choice of a user pointer for recvmsg.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     
  • Factor out two helpes to keep the code tidy.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     
  • Add a variant of CMSG_DATA that operates on user pointer to avoid
    sparse warnings about casting to/from user pointers. Also fix up
    CMSG_DATA to rely on the gcc extension that allows void pointer
    arithmetics to cut down on the amount of casts.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     

15 Nov, 2019

1 commit


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

04 Feb, 2019

1 commit

  • Add SO_TIMESTAMPING_NEW variant of socket timestamp options.
    This is the y2038 safe versions of the SO_TIMESTAMPING_OLD
    for all architectures.

    Signed-off-by: Deepa Dinamani
    Acked-by: Willem de Bruijn
    Cc: chris@zankel.net
    Cc: fenghua.yu@intel.com
    Cc: rth@twiddle.net
    Cc: tglx@linutronix.de
    Cc: ubraun@linux.ibm.com
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: sparclinux@vger.kernel.org
    Signed-off-by: David S. Miller

    Deepa Dinamani
     

02 Mar, 2017

1 commit


05 Jan, 2017

1 commit


25 Dec, 2016

1 commit


08 Feb, 2016

1 commit

  • The commit referenced in the Fixes tag incorrectly accounted the number
    of in-flight fds over a unix domain socket to the original opener
    of the file-descriptor. This allows another process to arbitrary
    deplete the original file-openers resource limit for the maximum of
    open files. Instead the sending processes and its struct cred should
    be credited.

    To do so, we add a reference counted struct user_struct pointer to the
    scm_fp_list and use it to account for the number of inflight unix fds.

    Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets")
    Reported-by: David Herrmann
    Cc: David Herrmann
    Cc: Willy Tarreau
    Cc: Linus Torvalds
    Suggested-by: Linus Torvalds
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     

09 Dec, 2015

1 commit

  • Introduce sock->sk_cgrp_data which is a struct sock_cgroup_data.
    ->sk_cgroup_prioidx and ->sk_classid are moved into it. The struct
    and its accessors are defined in cgroup-defs.h. This is to prepare
    for overloading the fields with a cgroup pointer.

    This patch mostly performs equivalent conversions but the followings
    are noteworthy.

    * Equality test before updating classid is removed from
    sock_update_classid(). This shouldn't make any noticeable
    difference and a similar test will be implemented on the helper side
    later.

    * sock_update_netprioidx() now takes struct sock_cgroup_data and can
    be moved to netprio_cgroup.h without causing include dependency
    loop. Moved.

    * The dummy version of sock_update_netprioidx() converted to a static
    inline function while at it.

    Signed-off-by: Tejun Heo
    Signed-off-by: David S. Miller

    Tejun Heo
     

23 Nov, 2015

1 commit

  • David and HacKurx reported a following/similar size overflow triggered
    in a grsecurity kernel, thanks to PaX's gcc size overflow plugin:

    (Already fixed in later grsecurity versions by Brad and PaX Team.)

    [ 1002.296137] PAX: size overflow detected in function scm_detach_fds net/core/scm.c:314
    cicus.202_127 min, count: 4, decl: msg_controllen; num: 0; context: msghdr;
    [ 1002.296145] CPU: 0 PID: 3685 Comm: scm_rights_recv Not tainted 4.2.3-grsec+ #7
    [ 1002.296149] Hardware name: Apple Inc. MacBookAir5,1/Mac-66F35F19FE2A0D05, [...]
    [ 1002.296153] ffffffff81c27366 0000000000000000 ffffffff81c27375 ffffc90007843aa8
    [ 1002.296162] ffffffff818129ba 0000000000000000 ffffffff81c27366 ffffc90007843ad8
    [ 1002.296169] ffffffff8121f838 fffffffffffffffc fffffffffffffffc ffffc90007843e60
    [ 1002.296176] Call Trace:
    [ 1002.296190] [] dump_stack+0x45/0x57
    [ 1002.296200] [] report_size_overflow+0x38/0x60
    [ 1002.296209] [] scm_detach_fds+0x2ce/0x300
    [ 1002.296220] [] unix_stream_read_generic+0x609/0x930
    [ 1002.296228] [] unix_stream_recvmsg+0x4f/0x60
    [ 1002.296236] [] ? unix_set_peek_off+0x50/0x50
    [ 1002.296243] [] sock_recvmsg+0x47/0x60
    [ 1002.296248] [] ___sys_recvmsg+0xe2/0x1e0
    [ 1002.296257] [] __sys_recvmsg+0x46/0x80
    [ 1002.296263] [] SyS_recvmsg+0x2c/0x40
    [ 1002.296271] [] entry_SYSCALL_64_fastpath+0x12/0x85

    Further investigation showed that this can happen when an *odd* number of
    fds are being passed over AF_UNIX sockets.

    In these cases CMSG_LEN(i * sizeof(int)) and CMSG_SPACE(i * sizeof(int)),
    where i is the number of successfully passed fds, differ by 4 bytes due
    to the extra CMSG_ALIGN() padding in CMSG_SPACE() to an 8 byte boundary
    on 64 bit. The padding is used to align subsequent cmsg headers in the
    control buffer.

    When the control buffer passed in from the receiver side *lacks* these 4
    bytes (e.g. due to buggy/wrong API usage), then msg->msg_controllen will
    overflow in scm_detach_fds():

    int cmlen = CMSG_LEN(i * sizeof(int)); cmsg_level);
    if (!err)
    err = put_user(SCM_RIGHTS, &cm->cmsg_type);
    if (!err)
    err = put_user(cmlen, &cm->cmsg_len);
    if (!err) {
    cmlen = CMSG_SPACE(i * sizeof(int)); msg_control += cmlen;
    msg->msg_controllen -= cmlen; msg_controllen of 20 bytes, and the sender
    properly transferred 1 fd to the receiver, so that its CMSG_LEN results
    in 20 bytes and CMSG_SPACE in 24 bytes.

    In case of MSG_CMSG_COMPAT (scm_detach_fds_compat()), I haven't seen an
    issue in my tests as alignment seems always on 4 byte boundary. Same
    should be in case of native 32 bit, where we end up with 4 byte boundaries
    as well.

    In practice, passing msg->msg_controllen of 20 to recvmsg() while receiving
    a single fd would mean that on successful return, msg->msg_controllen is
    being set by the kernel to 24 bytes instead, thus more than the input
    buffer advertised. It could f.e. become an issue if such application later
    on zeroes or copies the control buffer based on the returned msg->msg_controllen
    elsewhere.

    Maximum number of fds we can send is a hard upper limit SCM_MAX_FD (253).

    Going over the code, it seems like msg->msg_controllen is not being read
    after scm_detach_fds() in scm_recv() anymore by the kernel, good!

    Relevant recvmsg() handler are unix_dgram_recvmsg() (unix_seqpacket_recvmsg())
    and unix_stream_recvmsg(). Both return back to their recvmsg() caller,
    and ___sys_recvmsg() places the updated length, that is, new msg_control -
    old msg_control pointer into msg->msg_controllen (hence the 24 bytes seen
    in the example).

    Long time ago, Wei Yongjun fixed something related in commit 1ac70e7ad24a
    ("[NET]: Fix function put_cmsg() which may cause usr application memory
    overflow").

    RFC3542, section 20.2. says:

    The fields shown as "XX" are possible padding, between the cmsghdr
    structure and the data, and between the data and the next cmsghdr
    structure, if required by the implementation. While sending an
    application may or may not include padding at the end of last
    ancillary data in msg_controllen and implementations must accept both
    as valid. On receiving a portable application must provide space for
    padding at the end of the last ancillary data as implementations may
    copy out the padding at the end of the control message buffer and
    include it in the received msg_controllen. When recvmsg() is called
    if msg_controllen is too small for all the ancillary data items
    including any trailing padding after the last item an implementation
    may set MSG_CTRUNC.

    Since we didn't place MSG_CTRUNC for already quite a long time, just do
    the same as in 1ac70e7ad24a to avoid an overflow.

    Btw, even man-page author got this wrong :/ See db939c9b26e9 ("cmsg.3: Fix
    error in SCM_RIGHTS code sample"). Some people must have copied this (?),
    thus it got triggered in the wild (reported several times during boot by
    David and HacKurx).

    No Fixes tag this time as pre 2002 (that is, pre history tree).

    Reported-by: David Sterba
    Reported-by: HacKurx
    Cc: PaX Team
    Cc: Emese Revfy
    Cc: Brad Spengler
    Cc: Wei Yongjun
    Cc: Eric Dumazet
    Reviewed-by: Hannes Frederic Sowa
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

11 Dec, 2014

1 commit


08 Sep, 2013

1 commit

  • Pull namespace changes from Eric Biederman:
    "This is an assorted mishmash of small cleanups, enhancements and bug
    fixes.

    The major theme is user namespace mount restrictions. nsown_capable
    is killed as it encourages not thinking about details that need to be
    considered. A very hard to hit pid namespace exiting bug was finally
    tracked and fixed. A couple of cleanups to the basic namespace
    infrastructure.

    Finally there is an enhancement that makes per user namespace
    capabilities usable as capabilities, and an enhancement that allows
    the per userns root to nice other processes in the user namespace"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    userns: Kill nsown_capable it makes the wrong thing easy
    capabilities: allow nice if we are privileged
    pidns: Don't have unshare(CLONE_NEWPID) imply CLONE_THREAD
    userns: Allow PR_CAPBSET_DROP in a user namespace.
    namespaces: Simplify copy_namespaces so it is clear what is going on.
    pidns: Fix hang in zap_pid_ns_processes by sending a potentially extra wakeup
    sysfs: Restrict mounting sysfs
    userns: Better restrictions on when proc and sysfs can be mounted
    vfs: Don't copy mount bind mounts of /proc//ns/mnt between namespaces
    kernel/nsproxy.c: Improving a snippet of code.
    proc: Restrict mounting the proc filesystem
    vfs: Lock in place mounts from more privileged users

    Linus Torvalds
     

31 Aug, 2013

1 commit


28 Aug, 2013

1 commit


10 Apr, 2013

2 commits


08 Apr, 2013

1 commit

  • Now that uids and gids are completely encapsulated in kuid_t
    and kgid_t we no longer need to pass struct cred which allowed
    us to test both the uid and the user namespace for equality.

    Passing struct cred potentially allows us to pass the entire group
    list as BSD does but I don't believe the cost of cache line misses
    justifies retaining code for a future potential application.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

18 Mar, 2013

1 commit


23 Jan, 2013

1 commit

  • Commit 6a328d8c6f03501657ad580f6f98bf9a42583ff7 changed the update
    logic for the socket but it does not update the SCM_RIGHTS update
    as well. This patch is based on the net_prio fix commit

    48a87cc26c13b68f6cce4e9d769fcb17a6b3e4b8

    net: netprio: fd passed in SCM_RIGHTS datagram not set correctly

    A socket fd passed in a SCM_RIGHTS datagram was not getting
    updated with the new tasks cgrp prioidx. This leaves IO on
    the socket tagged with the old tasks priority.

    To fix this add a check in the scm recvmsg path to update the
    sock cgrp prioidx with the new tasks value.

    Let's apply the same fix for net_cls.

    Signed-off-by: Daniel Wagner
    Reported-by: Li Zefan
    Cc: "David S. Miller"
    Cc: "Eric W. Biederman"
    Cc: Al Viro
    Cc: John Fastabend
    Cc: Neil Horman
    Cc: netdev@vger.kernel.org
    Cc: cgroups@vger.kernel.org
    Signed-off-by: David S. Miller

    Daniel Wagner
     

19 Nov, 2012

1 commit


03 Oct, 2012

1 commit

  • Pull vfs update from Al Viro:

    - big one - consolidation of descriptor-related logics; almost all of
    that is moved to fs/file.c

    (BTW, I'm seriously tempted to rename the result to fd.c. As it is,
    we have a situation when file_table.c is about handling of struct
    file and file.c is about handling of descriptor tables; the reasons
    are historical - file_table.c used to be about a static array of
    struct file we used to have way back).

    A lot of stray ends got cleaned up and converted to saner primitives,
    disgusting mess in android/binder.c is still disgusting, but at least
    doesn't poke so much in descriptor table guts anymore. A bunch of
    relatively minor races got fixed in process, plus an ext4 struct file
    leak.

    - related thing - fget_light() partially unuglified; see fdget() in
    there (and yes, it generates the code as good as we used to have).

    - also related - bits of Cyrill's procfs stuff that got entangled into
    that work; _not_ all of it, just the initial move to fs/proc/fd.c and
    switch of fdinfo to seq_file.

    - Alex's fs/coredump.c spiltoff - the same story, had been easier to
    take that commit than mess with conflicts. The rest is a separate
    pile, this was just a mechanical code movement.

    - a few misc patches all over the place. Not all for this cycle,
    there'll be more (and quite a few currently sit in akpm's tree)."

    Fix up trivial conflicts in the android binder driver, and some fairly
    simple conflicts due to two different changes to the sock_alloc_file()
    interface ("take descriptor handling from sock_alloc_file() to callers"
    vs "net: Providing protocol type via system.sockprotoname xattr of
    /proc/PID/fd entries" adding a dentry name to the socket)

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (72 commits)
    MAX_LFS_FILESIZE should be a loff_t
    compat: fs: Generic compat_sys_sendfile implementation
    fs: push rcu_barrier() from deactivate_locked_super() to filesystems
    btrfs: reada_extent doesn't need kref for refcount
    coredump: move core dump functionality into its own file
    coredump: prevent double-free on an error path in core dumper
    usb/gadget: fix misannotations
    fcntl: fix misannotations
    ceph: don't abuse d_delete() on failure exits
    hypfs: ->d_parent is never NULL or negative
    vfs: delete surplus inode NULL check
    switch simple cases of fget_light to fdget
    new helpers: fdget()/fdput()
    switch o2hb_region_dev_write() to fget_light()
    proc_map_files_readdir(): don't bother with grabbing files
    make get_file() return its argument
    vhost_set_vring(): turn pollstart/pollstop into bool
    switch prctl_set_mm_exe_file() to fget_light()
    switch xfs_find_handle() to fget_light()
    switch xfs_swapext() to fget_light()
    ...

    Linus Torvalds
     

27 Sep, 2012

1 commit


08 Sep, 2012

1 commit

  • Passing uids and gids on NETLINK_CB from a process in one user
    namespace to a process in another user namespace can result in the
    wrong uid or gid being presented to userspace. Avoid that problem by
    passing kuids and kgids instead.

    - define struct scm_creds for use in scm_cookie and netlink_skb_parms
    that holds uid and gid information in kuid_t and kgid_t.

    - Modify scm_set_cred to fill out scm_creds by heand instead of using
    cred_to_ucred to fill out struct ucred. This conversion ensures
    userspace does not get incorrect uid or gid values to look at.

    - Modify scm_recv to convert from struct scm_creds to struct ucred
    before copying credential values to userspace.

    - Modify __scm_send to populate struct scm_creds on in the scm_cookie,
    instead of just copying struct ucred from userspace.

    - Modify netlink_sendmsg to copy scm_creds instead of struct ucred
    into the NETLINK_CB.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

25 Aug, 2012

1 commit


17 Aug, 2012

1 commit

  • A socket fd passed in a SCM_RIGHTS datagram was not getting
    updated with the new tasks cgrp prioidx. This leaves IO on
    the socket tagged with the old tasks priority.

    To fix this add a check in the scm recvmsg path to update the
    sock cgrp prioidx with the new tasks value.

    Thanks to Al Viro for catching this.

    CC: Neil Horman
    Reported-by: Al Viro
    Signed-off-by: John Fastabend
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    John Fastabend
     

15 Aug, 2012

1 commit

  • With the existence of kuid_t and kgid_t we can take this further
    and remove the usage of struct cred altogether, ensuring we
    don't get cache line misses from reference counts. For now
    however start simply and do a straight forward conversion
    I can be certain is correct.

    In cred_to_ucred use from_kuid_munged and from_kgid_munged
    as these values are going directly to userspace and we want to use
    the userspace safe values not -1 when reporting a value that does not
    map. The earlier conversion that used from_kuid was buggy in that
    respect. Oops.

    Cc: Eric Dumazet
    Acked-by: David S. Miller
    Acked-by: Serge Hallyn
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     

23 Jul, 2012

1 commit


29 Mar, 2012

1 commit


29 Sep, 2011

1 commit

  • Since commit 7361c36c5224 (af_unix: Allow credentials to work across
    user and pid namespaces) af_unix performance dropped a lot.

    This is because we now take a reference on pid and cred in each write(),
    and release them in read(), usually done from another process,
    eventually from another cpu. This triggers false sharing.

    # Events: 154K cycles
    #
    # Overhead Command Shared Object Symbol
    # ........ ....... .................. .........................
    #
    10.40% hackbench [kernel.kallsyms] [k] put_pid
    8.60% hackbench [kernel.kallsyms] [k] unix_stream_recvmsg
    7.87% hackbench [kernel.kallsyms] [k] unix_stream_sendmsg
    6.11% hackbench [kernel.kallsyms] [k] do_raw_spin_lock
    4.95% hackbench [kernel.kallsyms] [k] unix_scm_to_skb
    4.87% hackbench [kernel.kallsyms] [k] pid_nr_ns
    4.34% hackbench [kernel.kallsyms] [k] cred_to_ucred
    2.39% hackbench [kernel.kallsyms] [k] unix_destruct_scm
    2.24% hackbench [kernel.kallsyms] [k] sub_preempt_count
    1.75% hackbench [kernel.kallsyms] [k] fget_light
    1.51% hackbench [kernel.kallsyms] [k]
    __mutex_lock_interruptible_slowpath
    1.42% hackbench [kernel.kallsyms] [k] sock_alloc_send_pskb

    This patch includes SCM_CREDENTIALS information in a af_unix message/skb
    only if requested by the sender, [man 7 unix for details how to include
    ancillary data using sendmsg() system call]

    Note: This might break buggy applications that expected SCM_CREDENTIAL
    from an unaware write() system call, and receiver not using SO_PASSCRED
    socket option.

    If SOCK_PASSCRED is set on source or destination socket, we still
    include credentials for mere write() syscalls.

    Performance boost in hackbench : more than 50% gain on a 16 thread
    machine (2 quad-core cpus, 2 threads per core)

    hackbench 20 thread 2000

    4.228 sec instead of 9.102 sec

    Signed-off-by: Eric Dumazet
    Acked-by: Tim Chen
    Signed-off-by: David S. Miller

    Eric Dumazet
     

11 Aug, 2011

1 commit


15 Mar, 2011

1 commit


25 Nov, 2010

1 commit

  • Lower SCM_MAX_FD from 255 to 253 so that allocations for scm_fp_list are
    halved. (commit f8d570a4 added two pointers in this structure)

    scm_fp_dup() should not copy whole structure (and trigger kmemcheck
    warnings), but only the used part. While we are at it, only allocate
    needed size.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

13 Jul, 2010

1 commit


17 Jun, 2010

1 commit

  • Start capturing not only the userspace pid, uid and gid values of the
    sending process but also the struct pid and struct cred of the sending
    process as well.

    This is in preparation for properly supporting SCM_CREDENTIALS for
    sockets that have different uid and/or pid namespaces at the different
    ends.

    Signed-off-by: Eric W. Biederman
    Acked-by: Serge E. Hallyn
    Signed-off-by: David S. Miller

    Eric W. Biederman