au-ts / sddf

A collection of interfaces, libraries and tools for writing device drivers for seL4 that allow accessing devices securely and with low overhead.
Other
22 stars 16 forks source link

net: remove 'size' field #59

Closed Ivan-Velickovic closed 7 months ago

Ivan-Velickovic commented 7 months ago

The size field on the network queues is a runtime parameter that ends up in shared memory. https://github.com/au-ts/sDDF/blob/9ed838f2c1efcb7d8e107edde7ba8d9eb9c386cd/include/sddf/network/shared_ringbuffer.h#L26

This is dangerous since a malicious client could mess with the value causing the trusted virtualiser to do out of bounds access.

In addition, we are not planning right now to have runtime configurable/dynamic sizes of these shared structures and so having a field is not necessary.

Ivan-Velickovic commented 7 months ago

Done in https://github.com/au-ts/sDDF/pull/75.