From: Victor Porton <porton@narod.ru>
To: "selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>
Subject: Re: Restrict to a fixed Internet domain in a sandbox
Date: Thu, 09 Jan 2014 21:22:49 +0200 [thread overview]
Message-ID: <21561389295369@web15j.yandex.ru> (raw)
In-Reply-To: <16931389295100@web15j.yandex.ru>
09.01.2014, 21:21, "Victor Porton" <porton@narod.ru>:
> I've realized that this would not work in the case of DNS round-robin load balancing, because the IP used by a sandboxed program may differ from the IP set by my application (which calls the sandbox).
>
> So now I propose the following alternative
>
> struct full_host_desc_t {
> struct sockaddr *ADDR, socklen_t LENGTH;
> };
// a little error: '.' instead of ';'
struct full_host_desc_t {
struct sockaddr *ADDR;
socklen_t LENGTH;
};
> int selinux_restrict_domains(struct full_host_desc_t *hosts, unsigned int num_hosts);
>
> Maybe there can be constructed a more efficient API.
>
> 09.01.2014, 21:02, "Victor Porton" <porton@narod.ru>:
>
>> Sorry, it should restrict not only domain but also port and protocol.
>>
>> So I propose this new syscall to restrict an application by "same-origin" policy:
>>
>> int selinux_restrict_domain(struct sockaddr *ADDR, socklen_t LENGTH);
>>
>> I am not sure that it is the best API specification. Please comment.
>>
>> Note that probably all connections we need are TCP (not UDP), but we can support all protocols for completeness.
>>
>> 09.01.2014, 18:59, "Victor Porton" <porton@narod.ru>:
>>> 09.01.2014, 18:39, "Victor Porton" <porton@narod.ru>:
>>>> I remind that sandbox is implemented in Fedora using SELinux.
>>>>
>>>> It would be useful to restrict sandboxed application to connect only to one, programmatically specified Internet domain (just like Java and JavaScript security).
>>>>
>>>> It seems it is impossible with current SELinux.
>>>>
>>>> Could you add necessary features? Please!
>>> You could add a syscall like:
>>>
>>> int selinux_restrict_domain(const char *domain);
>>>
>>> (We could modify this interface to restrict to a finite list of domains instead of one domain, but personally I don't need this.)
>>>
>>> --
>>> Victor Porton - http://portonvictor.org
>> --
>> Victor Porton - http://portonvictor.org
>>
>> _______________________________________________
>> Selinux mailing list
>> Selinux@tycho.nsa.gov
>> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
>> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
>
> --
> Victor Porton - http://portonvictor.org
>
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2014-01-09 19:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 16:37 Restrict to a fixed Internet domain in a sandbox Victor Porton
2014-01-09 16:59 ` Victor Porton
2014-01-09 17:03 ` William Roberts
2014-01-09 17:19 ` Victor Porton
2014-01-09 17:34 ` William Roberts
2014-01-09 18:28 ` Victor Porton
2014-01-09 18:59 ` Victor Porton
2014-01-09 19:18 ` Victor Porton
2014-01-09 19:22 ` Victor Porton [this message]
2014-01-09 19:25 ` Stephen Smalley
2014-01-09 19:31 ` Victor Porton
2014-01-09 19:34 ` Stephen Smalley
2014-01-09 19:44 ` Victor Porton
2014-01-09 19:58 ` Victor Porton
2014-01-09 20:06 ` Stephen Smalley
2014-01-09 20:14 ` Victor Porton
2014-01-09 20:21 ` Stephen Smalley
2014-01-10 18:41 ` Victor Porton
2014-01-10 18:47 ` Stephen Smalley
2014-01-10 18:53 ` Victor Porton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21561389295369@web15j.yandex.ru \
--to=porton@narod.ru \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.