Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec Problem #19

Open
d1jang opened this issue Oct 25, 2012 · 4 comments
Open

Spec Problem #19

d1jang opened this issue Oct 25, 2012 · 4 comments

Comments

@d1jang
Copy link

d1jang commented Oct 25, 2012

Our kernel specification has a problem that lets a component of type A can freely call message handlers that belong to components of type B.

Here's the problem. The specification doesn't mention the component type that executes a message handler as follows :

| VE_Main_M_0 :
forall y c,
ValidExchange (mkst comps
(tr ~~~ ((Exec_t (string2str "test.py") c2 ++ SendMsg c (M (("H" :: "E" :: "L" :: "L" :: "O" :: nil))) ++ RecvMsg c (M y)) ++ tr))
)

As you can see, it doesn't check anything on c, the channel used for this communication. This can cause a problem that different components are allowed for different capabilities.

Imagine that a component A can obtain secret data from the kernel as free as it wants by calling event handler H1. We want another component B not to be able to do that. But our spec doesn't say anything about it. So even a program verified to follow the spec can leak secret data to any components. Therefore, we're not going to prove security properties without fixing this problem since we can't discriminate different components now.

A solution is simple : to add meta data to signify which channel is to whom, and maintain that information in the kernel state. So the spec will look like this :

| VE_Main_M_0 :
forall y c c2,
In c comps ->
Typeof kst c MainType ->
ValidExchange (mkst c2::comps
(tr ~~~ ((Exec_t (string2str "test.py") c2 ++ SendMsg c (M (("H" :: "E" :: "L" :: "L" :: "O" :: nil))) ++ RecvMsg c (M y)) ++ tr))
)

I'm planning to fix this problem after finishing whenclause stuff.
Any thoughts on this?

@ztatlock
Copy link
Contributor

I think the problem is just that the spec is incomplete.

The actual code does check the component type before dispatching to the correct handler.

So we need to update the spec generator...

@d1jang d1jang closed this as completed Nov 1, 2012
@ztatlock
Copy link
Contributor

ztatlock commented Nov 1, 2012

@d1jang Why did you close this? Isn't it still an issue?

@d1jang
Copy link
Author

d1jang commented Nov 2, 2012

This is still an issue. Sorry for the mistake!

@d1jang d1jang reopened this Nov 2, 2012
@ztatlock
Copy link
Contributor

ztatlock commented Nov 2, 2012

Haha, no worries! I've accidentally closed / reopened several issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants