Hello,

these are three unrelated fixes I ran into while porting Tailscale to
GNU/Hurd (the port runs on both hurd-i386 and hurd-amd64, using pfinet
via /hurd/tuntap, and pflocal for its local API socket).

1/3 pfinet: Fix tunnel lock order

    trivfs_S_io_write takes tdev->lock before net_bh_lock, while
    tunnel_xmit runs under net_bh (with net_bh_lock held by
    net_bh_worker) and takes tdev->lock.

2/3 pfinet: Handle a missing default IPv6 router

    ipv6_get_dflt_router() dereferences fib without checking it and
    returns fib->leaf, which can also be NULL; two of its three callers
    then dereference the result, and the third did not check either.
    Return NULL when fib is NULL and guard all three callers.

3/3 pflocal: Report the connecting user's credentials on accepted sockets

    The accepted server-side socket is created with sock_clone(), which
    gives it pflocal's own uid/gid (normally root) rather than the
    connecting user's, so fstat() on the accepted AF_LOCAL socket
    reports root.  Copy the connecting socket's uid/gid onto the clone,
    so the accepting side can learn the peer's credentials with
    fstat().

Thanks,
David

David Bidner (3):
  pfinet: Fix tunnel lock order
  pfinet: Handle a missing default IPv6 router
  pflocal: Report the connecting user's credentials on accepted sockets

 pfinet/options.c | 10 +++++-----
 pfinet/tunnel.c  |  5 +++--
 pflocal/socket.c |  2 ++
 3 files changed, 10 insertions(+), 7 deletions(-)

-- 
2.47.3


Reply via email to