8000 App crashing allows potential sharing of kernel memory · Issue #4371 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
App crashing allows potential sharing of kernel memory #4371
Open
@vrindisbacher

Description

@vrindisbacher

Hi - I believe that there is a potential issue with the current read/write allow buffer sharing implementation. I believe that you can achieve the same affect as #1141 by deliberately crashing a process whose fault policy is restart. Here is a scenario that describes the problem:

  1. There is a process (let's call it process s) that exposes some service to other apps.
  2. There is another (let's call it process c) process that uses said service.
  3. Then, process c uses a read write allow syscall to give process s access to a read/write buffer.
  4. Then, process c crashes. If the fault policy for the app is to restart, it seems a problematic case arises.

Looking at try_restart, it calls reset which resets the app break AND the high water mark to their initial values. Unfortunately, at this point there will be a read/write buffer that is unguarded by the high water mark, and the grant region might grow into this buffer. This would allow process s, the server, to access kernel memory.

From reading the docs on restart policies, I understand that not every app may be given a restart fault policy but I think this is still problematic and should be protected against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Bug

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0