All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: James Morris <jmorris@namei.org>
Cc: KaiGai Kohei <kaigai@ak.jp.nec.com>,
	SELinux@tycho.nsa.gov, Stephen Frost <sfrost@snowman.net>
Subject: Re: (forw) [bruce@momjian.us: [ANNOUNCE] Need help on possible PG 8.4 security features]
Date: Tue, 27 Jan 2009 23:20:41 +0900	[thread overview]
Message-ID: <497F1839.6@kaigai.gr.jp> (raw)
In-Reply-To: <alpine.LRH.1.10.0901280020200.8686@tundra.namei.org>

James Morris wrote:
> On Tue, 27 Jan 2009, KaiGai Kohei wrote:
> 
>> It seems to me some of pgsql-hackers concerned about security experts
>> don't join to its review process (except for me :), so it is unclear
>> whether the SE-PostgreSQL feature is really desired, or not, and
>> whether its security design is really appropriate, or not.
> 
> It's a pity you couldn't make it to LCA, as I had a question which I 
> suspect only you could answer.
> 
> One thing I noticed was the use of MCS for labels relating to external 
> subjects, and the type field being used apparently for internal purposes.
> 
> Is this correct?
> 
> (From memory, the type field of some rows were along the lines of
> fixed_table_t, presumably for internal db use).

There are no specific discrimination like internal/external.
SE-PostgreSQL simply assigns a default security context based
on type_transition rules, or inherits upper class obejct.

At the LCA example, I assigned sepgsql_fixed_table_t on the
"drink" table, so newly inserted tuples also inherit it.

> Can the entire security context be specified and utilized for the data 
> itself ?  e.g. Can data be inserted into the db with the label 
> "system_u:object_r:shadow_t", corresponding exactly to the filesystem 
> label of the file it came from?

Please consider the following case.
  1. App-X read /etc/shadhow (system_u:object_r:shadow_t)
  2. App-X create a file /tmp/aaa
  3. App-X write a buffered data into /tmp/aaa
In this case, /tmp/aaa will be labeled as "tmp_t".

  1'. App-X read /etc/shadhow (system_u:object_r:shadow_t)
  2'. App-X insert a row with buffered data.
In this case, I don't think it should be labeled as "shadow_t".
The newly inserted row is labeled based on TYPE_TRANSITION, or
inherits its table's context.
(Maybe, "sepgsql_table_t" in default)

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2009-01-27 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27  1:24 (forw) [bruce@momjian.us: [ANNOUNCE] Need help on possible PG 8.4 security features] Stephen Frost
2009-01-27  8:22 ` KaiGai Kohei
2009-01-27 13:26   ` James Morris
2009-01-27 14:20     ` KaiGai Kohei [this message]
2009-01-27 21:53       ` James Morris
2009-01-27 23:19         ` KaiGai Kohei

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=497F1839.6@kaigai.gr.jp \
    --to=kaigai@kaigai.gr.jp \
    --cc=SELinux@tycho.nsa.gov \
    --cc=jmorris@namei.org \
    --cc=kaigai@ak.jp.nec.com \
    --cc=sfrost@snowman.net \
    /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.