Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299344
| From | One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] unix: properly account for FDs passed over unix sockets |
| Date | 2015-12-30 14:20 +0100 |
| Message-ID | <qLoPv-76p-1@gated-at.bofh.it> (permalink) |
| References | <qKGOu-3bZ-17@gated-at.bofh.it> <qL3L3-1P0-13@gated-at.bofh.it> <qL9dM-5lK-15@gated-at.bofh.it> <qLkLU-4kl-11@gated-at.bofh.it> <qLn73-5Wu-7@gated-at.bofh.it> |
| Organization | Intel Corporation |
> > Another idea would be to add the amount of memory used to manage the fds > > to sock_rmem/wmem but I don't see any advantages or disadvantages. > > Compared to the impact of the pending data in pipes themselves in flight, > this would remain fairly minimal. The true size of the memory pinned by a file handle cannot be determined by the socket layer anyway. If the handle is for a device it may be pinning lots of memory in the device driver. It's up to the rest of the system to manage and contain those resource allocations correctly which a fair bit of the code (except graphics) does properly. The resource counting does create the reverse problem that user A running a program written by hostile user B may find it takes all their resources, stuffs them down an AF_UNIX socket and passes the last reference to the socket via a setuid app somewhere where the user can't get it back. For an end user case that's pretty irrelevant - you run hostile user B's app then you already lost. For a service it's an interesting attack vector but not one I can see any obvious ways to exploit because (with the possible exception of dbus) services simply don't pass file handles down sockets to untrusted targets. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2015-12-28 15:20 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-12-29 15:40 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-12-29 15:50 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2015-12-29 21:40 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-12-30 10:00 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2015-12-30 12:30 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2015-12-30 14:20 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2015-12-31 07:10 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2015-12-31 08:20 +0100
Re: [PATCH] unix: properly account for FDs passed over unix sockets One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2015-12-31 11:40 +0100
csiph-web