TUD-OS / NRE

NOVA runtime environment (official branch)
GNU General Public License v2.0
33 stars 12 forks source link

Is this screen buffer overlapping a security issue? #54

Closed lonnietc closed 3 years ago

lonnietc commented 3 years ago

Hello All,

I started up the vmmng (copy made to vmmtest to play with more SMP cores) and started up a couple instances of the tiny core at which time I pinged a few sites for testing.

During this time, and knowing that the hypervisor information page is running:

Screenshot from 2021-07-04 15-26-19

I noticed what "seems" to be console screen over-writes when I am pinging from within Tinycore from the hypervisor information page (above)

Screenshot from 2021-07-04 15-20-44

You can see the light-blue "E, D, 9, 3" on the right in the "QEMU (vmmtest)" window as well as a light-green "4, A" and a yellow "F".

those characters are cycling though from the main hypervisor page and also changing as on that main page as well.

This makes me wonder if there is some shared memory in the NRE console services code that is overlapping screen buffers, or something, but more importantly, it makes me wonder if one PD could potentially gain access to another due to this overlapping space.

There could be other areas as well, but this was the first observable one that I came across.

Any thoughts?

Cheers and have a great weekend.

Nils-TUD commented 3 years ago

No, this is not a security issue, because NOVA is the one that overwrites the framebuffer of an application, not the other way around.

I am aware of this "problem" and if I remember that correctly, the reason is that NOVA is directly writing to the VGA framebuffer and thus overwrites portions of the screen. However, these "spinners" are a debugging feature and are not meant to be enabled in production. Thus, the easiest workaround is to just disable them by removing the "spinner" argument from NOVA's cmdline.

The only way to keep it enabled without interfering with applications is probably to let NOVA talk to the console service to write to the framebuffer (which would do nothing if the hypervisor console is not the active one) instead of just writing there. And this goes against the current design, I would say.

lonnietc commented 3 years ago

Thanks for your information on this and the "spinners".

I'll test things without them to see how it goes. Best